//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_spi(SotoInternal) import SotoCore

extension ApplicationAutoScaling {
    // MARK: Enums

    public enum AdjustmentType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case changeInCapacity = "ChangeInCapacity"
        case exactCapacity = "ExactCapacity"
        case percentChangeInCapacity = "PercentChangeInCapacity"
        public var description: String { return self.rawValue }
    }

    public enum MetricAggregationType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case average = "Average"
        case maximum = "Maximum"
        case minimum = "Minimum"
        public var description: String { return self.rawValue }
    }

    public enum MetricStatistic: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case average = "Average"
        case maximum = "Maximum"
        case minimum = "Minimum"
        case sampleCount = "SampleCount"
        case sum = "Sum"
        public var description: String { return self.rawValue }
    }

    public enum MetricType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case albRequestCountPerTarget = "ALBRequestCountPerTarget"
        case appStreamAverageCapacityUtilization = "AppStreamAverageCapacityUtilization"
        case cassandraReadCapacityUtilization = "CassandraReadCapacityUtilization"
        case cassandraWriteCapacityUtilization = "CassandraWriteCapacityUtilization"
        case comprehendInferenceUtilization = "ComprehendInferenceUtilization"
        case dynamoDBReadCapacityUtilization = "DynamoDBReadCapacityUtilization"
        case dynamoDBWriteCapacityUtilization = "DynamoDBWriteCapacityUtilization"
        case ec2SpotFleetRequestAverageCPUUtilization = "EC2SpotFleetRequestAverageCPUUtilization"
        case ec2SpotFleetRequestAverageNetworkIn = "EC2SpotFleetRequestAverageNetworkIn"
        case ec2SpotFleetRequestAverageNetworkOut = "EC2SpotFleetRequestAverageNetworkOut"
        case ecsServiceAverageCPUUtilization = "ECSServiceAverageCPUUtilization"
        case ecsServiceAverageMemoryUtilization = "ECSServiceAverageMemoryUtilization"
        case elastiCacheDatabaseCapacityUsageCountedForEvictPercentage = "ElastiCacheDatabaseCapacityUsageCountedForEvictPercentage"
        case elastiCacheDatabaseMemoryUsageCountedForEvictPercentage = "ElastiCacheDatabaseMemoryUsageCountedForEvictPercentage"
        case elastiCacheDatabaseMemoryUsagePercentage = "ElastiCacheDatabaseMemoryUsagePercentage"
        case elastiCacheEngineCPUUtilization = "ElastiCacheEngineCPUUtilization"
        case elastiCachePrimaryEngineCPUUtilization = "ElastiCachePrimaryEngineCPUUtilization"
        case elastiCacheReplicaEngineCPUUtilization = "ElastiCacheReplicaEngineCPUUtilization"
        case kafkaBrokerStorageUtilization = "KafkaBrokerStorageUtilization"
        case lambdaProvisionedConcurrencyUtilization = "LambdaProvisionedConcurrencyUtilization"
        case neptuneReaderAverageCPUUtilization = "NeptuneReaderAverageCPUUtilization"
        case rdsReaderAverageCPUUtilization = "RDSReaderAverageCPUUtilization"
        case rdsReaderAverageDatabaseConnections = "RDSReaderAverageDatabaseConnections"
        case sageMakerInferenceComponentConcurrentRequestsPerCopyHighResolution = "SageMakerInferenceComponentConcurrentRequestsPerCopyHighResolution"
        case sageMakerInferenceComponentInvocationsPerCopy = "SageMakerInferenceComponentInvocationsPerCopy"
        case sageMakerVariantConcurrentRequestsPerModelHighResolution = "SageMakerVariantConcurrentRequestsPerModelHighResolution"
        case sageMakerVariantInvocationsPerInstance = "SageMakerVariantInvocationsPerInstance"
        case sageMakerVariantProvisionedConcurrencyUtilization = "SageMakerVariantProvisionedConcurrencyUtilization"
        case workSpacesAverageUserSessionsCapacityUtilization = "WorkSpacesAverageUserSessionsCapacityUtilization"
        public var description: String { return self.rawValue }
    }

    public enum PolicyType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case predictiveScaling = "PredictiveScaling"
        case stepScaling = "StepScaling"
        case targetTrackingScaling = "TargetTrackingScaling"
        public var description: String { return self.rawValue }
    }

    public enum PredictiveScalingMaxCapacityBreachBehavior: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case honorMaxCapacity = "HonorMaxCapacity"
        case increaseMaxCapacity = "IncreaseMaxCapacity"
        public var description: String { return self.rawValue }
    }

    public enum PredictiveScalingMode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case forecastAndScale = "ForecastAndScale"
        case forecastOnly = "ForecastOnly"
        public var description: String { return self.rawValue }
    }

    public enum ScalableDimension: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case appstreamFleetDesiredCapacity = "appstream:fleet:DesiredCapacity"
        case cassandraTableReadCapacityUnits = "cassandra:table:ReadCapacityUnits"
        case cassandraTableWriteCapacityUnits = "cassandra:table:WriteCapacityUnits"
        case comprehendDocClassifierEndpointInferenceUnits = "comprehend:document-classifier-endpoint:DesiredInferenceUnits"
        case comprehendEntityRecognizerEndpointInferenceUnits = "comprehend:entity-recognizer-endpoint:DesiredInferenceUnits"
        case customResourceScalableDimension = "custom-resource:ResourceType:Property"
        case dynamoDBIndexReadCapacityUnits = "dynamodb:index:ReadCapacityUnits"
        case dynamoDBIndexWriteCapacityUnits = "dynamodb:index:WriteCapacityUnits"
        case dynamoDBTableReadCapacityUnits = "dynamodb:table:ReadCapacityUnits"
        case dynamoDBTableWriteCapacityUnits = "dynamodb:table:WriteCapacityUnits"
        case ec2SpotFleetRequestTargetCapacity = "ec2:spot-fleet-request:TargetCapacity"
        case ecsServiceDesiredCount = "ecs:service:DesiredCount"
        case elastiCacheCacheClusterNodes = "elasticache:cache-cluster:Nodes"
        case elastiCacheReplicationGroupNodeGroups = "elasticache:replication-group:NodeGroups"
        case elastiCacheReplicationGroupReplicas = "elasticache:replication-group:Replicas"
        case emrInstanceGroupInstanceCount = "elasticmapreduce:instancegroup:InstanceCount"
        case kafkaBrokerStorageVolumeSize = "kafka:broker-storage:VolumeSize"
        case lambdaFunctionProvisionedConcurrency = "lambda:function:ProvisionedConcurrency"
        case neptuneClusterReadReplicaCount = "neptune:cluster:ReadReplicaCount"
        case rdsClusterReadReplicaCount = "rds:cluster:ReadReplicaCount"
        case sageMakerInferenceComponentDesiredCopyCount = "sagemaker:inference-component:DesiredCopyCount"
        case sageMakerVariantDesiredInstanceCount = "sagemaker:variant:DesiredInstanceCount"
        case sageMakerVariantDesiredProvisionedConcurrency = "sagemaker:variant:DesiredProvisionedConcurrency"
        case workSpacesWorkSpacesPoolDesiredUserSessions = "workspaces:workspacespool:DesiredUserSessions"
        public var description: String { return self.rawValue }
    }

    public enum ScalingActivityStatusCode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case failed = "Failed"
        case inProgress = "InProgress"
        case overridden = "Overridden"
        case pending = "Pending"
        case successful = "Successful"
        case unfulfilled = "Unfulfilled"
        public var description: String { return self.rawValue }
    }

    public enum ServiceNamespace: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case appstream = "appstream"
        case cassandra = "cassandra"
        case comprehend = "comprehend"
        case customResource = "custom-resource"
        case dynamodb = "dynamodb"
        case ec2 = "ec2"
        case ecs = "ecs"
        case elasticache = "elasticache"
        case emr = "elasticmapreduce"
        case kafka = "kafka"
        case lambda = "lambda"
        case neptune = "neptune"
        case rds = "rds"
        case sagemaker = "sagemaker"
        case workspaces = "workspaces"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct Alarm: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the alarm.
        public let alarmARN: String
        /// The name of the alarm.
        public let alarmName: String

        @inlinable
        public init(alarmARN: String, alarmName: String) {
            self.alarmARN = alarmARN
            self.alarmName = alarmName
        }

        private enum CodingKeys: String, CodingKey {
            case alarmARN = "AlarmARN"
            case alarmName = "AlarmName"
        }
    }

    public struct CapacityForecast: AWSDecodableShape {
        ///  The timestamps for the data points, in UTC format.
        public let timestamps: [Date]
        ///  The values of the data points.
        public let values: [Double]

        @inlinable
        public init(timestamps: [Date], values: [Double]) {
            self.timestamps = timestamps
            self.values = values
        }

        private enum CodingKeys: String, CodingKey {
            case timestamps = "Timestamps"
            case values = "Values"
        }
    }

    public struct CustomizedMetricSpecification: AWSEncodableShape & AWSDecodableShape {
        /// The dimensions of the metric.  Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.
        public let dimensions: [MetricDimension]?
        /// The name of the metric. To get the exact metric name, namespace, and dimensions, inspect the Metric object that's returned by a call to ListMetrics.
        public let metricName: String?
        /// The metrics to include in the target tracking scaling policy, as a metric data query. This can include both raw metric and metric math expressions.
        public let metrics: [TargetTrackingMetricDataQuery]?
        /// The namespace of the metric.
        public let namespace: String?
        /// The statistic of the metric.
        public let statistic: MetricStatistic?
        /// The unit of the metric. For a complete list of the units that CloudWatch supports, see the MetricDatum data type in the Amazon CloudWatch API Reference.
        public let unit: String?

        @inlinable
        public init(dimensions: [MetricDimension]? = nil, metricName: String? = nil, metrics: [TargetTrackingMetricDataQuery]? = nil, namespace: String? = nil, statistic: MetricStatistic? = nil, unit: String? = nil) {
            self.dimensions = dimensions
            self.metricName = metricName
            self.metrics = metrics
            self.namespace = namespace
            self.statistic = statistic
            self.unit = unit
        }

        public func validate(name: String) throws {
            try self.metrics?.forEach {
                try $0.validate(name: "\(name).metrics[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case dimensions = "Dimensions"
            case metricName = "MetricName"
            case metrics = "Metrics"
            case namespace = "Namespace"
            case statistic = "Statistic"
            case unit = "Unit"
        }
    }

    public struct DeleteScalingPolicyRequest: AWSEncodableShape {
        /// The name of the scaling policy.
        public let policyName: String
        /// The identifier of the resource associated with the scalable target. This string consists of the resource type and unique identifier.   ECS service - The resource type is service and the unique identifier is the cluster name   and service name. Example: service/my-cluster/my-service.   Spot Fleet - The resource type is spot-fleet-request and the unique identifier is the  Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.   EMR cluster - The resource type is instancegroup and the unique identifier is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.   AppStream 2.0 fleet - The resource type is fleet and the unique identifier is the fleet name. Example: fleet/sample-fleet.   DynamoDB table - The resource type is table and the unique identifier is the table name.  Example: table/my-table.   DynamoDB global secondary index - The resource type is index and the unique identifier is the index name.  Example: table/my-table/index/my-table-index.   Aurora DB cluster - The resource type is cluster and the unique identifier is the cluster name. Example: cluster:my-db-cluster.   SageMaker endpoint variant - The resource type is variant and the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.   Custom resources are not supported with a resource type. This parameter must specify the OutputValue from the CloudFormation template stack used to access the resources. The unique identifier is defined by the service provider. More information is available in our GitHub repository.   Amazon Comprehend document classification endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us-west-2:123456789012:document-classifier-endpoint/EXAMPLE.   Amazon Comprehend entity recognizer endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us-west-2:123456789012:entity-recognizer-endpoint/EXAMPLE.   Lambda provisioned concurrency - The resource type is function and the unique identifier is the function name with a function version or alias name suffix that is not $LATEST.  Example: function:my-function:prod or function:my-function:1.   Amazon Keyspaces table - The resource type is table and the unique identifier is the table name.  Example: keyspace/mykeyspace/table/mytable.   Amazon MSK cluster - The resource type and unique identifier are specified using the cluster ARN.  Example: arn:aws:kafka:us-east-1:123456789012:cluster/demo-cluster-1/6357e0b2-0e6a-4b86-a0b4-70df934c2e31-5.   Amazon ElastiCache replication group - The resource type is replication-group and the unique identifier is the replication group name. Example: replication-group/mycluster.   Amazon ElastiCache cache cluster - The resource type is cache-cluster and the unique identifier is the cache cluster name. Example: cache-cluster/mycluster.   Neptune cluster - The resource type is cluster and the unique identifier is the cluster name. Example: cluster:mycluster.   SageMaker serverless endpoint - The resource type is variant and the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.   SageMaker inference component - The resource type is inference-component and the unique identifier is the resource ID. Example: inference-component/my-inference-component.   Pool of WorkSpaces - The resource type is workspacespool and the unique identifier is the pool ID.  Example: workspacespool/wspool-123456.
        public let resourceId: String
        /// The scalable dimension. This string consists of the service namespace, resource type, and scaling property.    ecs:service:DesiredCount - The task count of an ECS service.    elasticmapreduce:instancegroup:InstanceCount - The instance count of an EMR Instance Group.    ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot Fleet.    appstream:fleet:DesiredCapacity - The capacity of an AppStream 2.0 fleet.    dynamodb:table:ReadCapacityUnits - The provisioned read capacity for a DynamoDB table.    dynamodb:table:WriteCapacityUnits - The provisioned write capacity for a DynamoDB table.    dynamodb:index:ReadCapacityUnits - The provisioned read capacity for a DynamoDB global secondary index.    dynamodb:index:WriteCapacityUnits - The provisioned write capacity for a DynamoDB global secondary index.    rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora DB cluster. Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible edition.    sagemaker:variant:DesiredInstanceCount - The number of EC2 instances for a SageMaker model endpoint variant.    custom-resource:ResourceType:Property - The scalable dimension for a custom resource provided by your own application or service.    comprehend:document-classifier-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend document classification endpoint.    comprehend:entity-recognizer-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend entity recognizer endpoint.    lambda:function:ProvisionedConcurrency - The provisioned concurrency for a Lambda function.    cassandra:table:ReadCapacityUnits - The provisioned read capacity for an Amazon Keyspaces table.    cassandra:table:WriteCapacityUnits - The provisioned write capacity for an Amazon Keyspaces table.    kafka:broker-storage:VolumeSize - The provisioned volume size (in GiB) for brokers in an Amazon MSK cluster.    elasticache:cache-cluster:Nodes - The number of nodes for an Amazon ElastiCache cache cluster.    elasticache:replication-group:NodeGroups - The number of node groups for an Amazon ElastiCache replication group.    elasticache:replication-group:Replicas - The number of replicas per node group for an Amazon ElastiCache replication group.    neptune:cluster:ReadReplicaCount - The count of read replicas in an Amazon Neptune DB cluster.    sagemaker:variant:DesiredProvisionedConcurrency - The provisioned concurrency for a SageMaker serverless endpoint.    sagemaker:inference-component:DesiredCopyCount - The number of copies across an endpoint for a SageMaker inference component.    workspaces:workspacespool:DesiredUserSessions - The number of user sessions for the WorkSpaces in the pool.
        public let scalableDimension: ScalableDimension
        /// The namespace of the Amazon Web Services service that provides the resource. For a resource provided by your own application or service, use custom-resource instead.
        public let serviceNamespace: ServiceNamespace

        @inlinable
        public init(policyName: String, resourceId: String, scalableDimension: ScalableDimension, serviceNamespace: ServiceNamespace) {
            self.policyName = policyName
            self.resourceId = resourceId
            self.scalableDimension = scalableDimension
            self.serviceNamespace = serviceNamespace
        }

        public func validate(name: String) throws {
            try self.validate(self.policyName, name: "policyName", parent: name, max: 1600)
            try self.validate(self.policyName, name: "policyName", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.resourceId, name: "resourceId", parent: name, max: 1600)
            try self.validate(self.resourceId, name: "resourceId", parent: name, min: 1)
            try self.validate(self.resourceId, name: "resourceId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case policyName = "PolicyName"
            case resourceId = "ResourceId"
            case scalableDimension = "ScalableDimension"
            case serviceNamespace = "ServiceNamespace"
        }
    }

    public struct DeleteScalingPolicyResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteScheduledActionRequest: AWSEncodableShape {
        /// The identifier of the resource associated with the scheduled action. This string consists of the resource type and unique identifier.   ECS service - The resource type is service and the unique identifier is the cluster name   and service name. Example: service/my-cluster/my-service.   Spot Fleet - The resource type is spot-fleet-request and the unique identifier is the  Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.   EMR cluster - The resource type is instancegroup and the unique identifier is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.   AppStream 2.0 fleet - The resource type is fleet and the unique identifier is the fleet name. Example: fleet/sample-fleet.   DynamoDB table - The resource type is table and the unique identifier is the table name.  Example: table/my-table.   DynamoDB global secondary index - The resource type is index and the unique identifier is the index name.  Example: table/my-table/index/my-table-index.   Aurora DB cluster - The resource type is cluster and the unique identifier is the cluster name. Example: cluster:my-db-cluster.   SageMaker endpoint variant - The resource type is variant and the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.   Custom resources are not supported with a resource type. This parameter must specify the OutputValue from the CloudFormation template stack used to access the resources. The unique identifier is defined by the service provider. More information is available in our GitHub repository.   Amazon Comprehend document classification endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us-west-2:123456789012:document-classifier-endpoint/EXAMPLE.   Amazon Comprehend entity recognizer endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us-west-2:123456789012:entity-recognizer-endpoint/EXAMPLE.   Lambda provisioned concurrency - The resource type is function and the unique identifier is the function name with a function version or alias name suffix that is not $LATEST.  Example: function:my-function:prod or function:my-function:1.   Amazon Keyspaces table - The resource type is table and the unique identifier is the table name.  Example: keyspace/mykeyspace/table/mytable.   Amazon MSK cluster - The resource type and unique identifier are specified using the cluster ARN.  Example: arn:aws:kafka:us-east-1:123456789012:cluster/demo-cluster-1/6357e0b2-0e6a-4b86-a0b4-70df934c2e31-5.   Amazon ElastiCache replication group - The resource type is replication-group and the unique identifier is the replication group name. Example: replication-group/mycluster.   Amazon ElastiCache cache cluster - The resource type is cache-cluster and the unique identifier is the cache cluster name. Example: cache-cluster/mycluster.   Neptune cluster - The resource type is cluster and the unique identifier is the cluster name. Example: cluster:mycluster.   SageMaker serverless endpoint - The resource type is variant and the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.   SageMaker inference component - The resource type is inference-component and the unique identifier is the resource ID. Example: inference-component/my-inference-component.   Pool of WorkSpaces - The resource type is workspacespool and the unique identifier is the pool ID.  Example: workspacespool/wspool-123456.
        public let resourceId: String
        /// The scalable dimension. This string consists of the service namespace, resource type, and scaling property.    ecs:service:DesiredCount - The task count of an ECS service.    elasticmapreduce:instancegroup:InstanceCount - The instance count of an EMR Instance Group.    ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot Fleet.    appstream:fleet:DesiredCapacity - The capacity of an AppStream 2.0 fleet.    dynamodb:table:ReadCapacityUnits - The provisioned read capacity for a DynamoDB table.    dynamodb:table:WriteCapacityUnits - The provisioned write capacity for a DynamoDB table.    dynamodb:index:ReadCapacityUnits - The provisioned read capacity for a DynamoDB global secondary index.    dynamodb:index:WriteCapacityUnits - The provisioned write capacity for a DynamoDB global secondary index.    rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora DB cluster. Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible edition.    sagemaker:variant:DesiredInstanceCount - The number of EC2 instances for a SageMaker model endpoint variant.    custom-resource:ResourceType:Property - The scalable dimension for a custom resource provided by your own application or service.    comprehend:document-classifier-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend document classification endpoint.    comprehend:entity-recognizer-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend entity recognizer endpoint.    lambda:function:ProvisionedConcurrency - The provisioned concurrency for a Lambda function.    cassandra:table:ReadCapacityUnits - The provisioned read capacity for an Amazon Keyspaces table.    cassandra:table:WriteCapacityUnits - The provisioned write capacity for an Amazon Keyspaces table.    kafka:broker-storage:VolumeSize - The provisioned volume size (in GiB) for brokers in an Amazon MSK cluster.    elasticache:cache-cluster:Nodes - The number of nodes for an Amazon ElastiCache cache cluster.    elasticache:replication-group:NodeGroups - The number of node groups for an Amazon ElastiCache replication group.    elasticache:replication-group:Replicas - The number of replicas per node group for an Amazon ElastiCache replication group.    neptune:cluster:ReadReplicaCount - The count of read replicas in an Amazon Neptune DB cluster.    sagemaker:variant:DesiredProvisionedConcurrency - The provisioned concurrency for a SageMaker serverless endpoint.    sagemaker:inference-component:DesiredCopyCount - The number of copies across an endpoint for a SageMaker inference component.    workspaces:workspacespool:DesiredUserSessions - The number of user sessions for the WorkSpaces in the pool.
        public let scalableDimension: ScalableDimension
        /// The name of the scheduled action.
        public let scheduledActionName: String
        /// The namespace of the Amazon Web Services service that provides the resource. For a resource provided by your own application or service, use custom-resource instead.
        public let serviceNamespace: ServiceNamespace

        @inlinable
        public init(resourceId: String, scalableDimension: ScalableDimension, scheduledActionName: String, serviceNamespace: ServiceNamespace) {
            self.resourceId = resourceId
            self.scalableDimension = scalableDimension
            self.scheduledActionName = scheduledActionName
            self.serviceNamespace = serviceNamespace
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceId, name: "resourceId", parent: name, max: 1600)
            try self.validate(self.resourceId, name: "resourceId", parent: name, min: 1)
            try self.validate(self.resourceId, name: "resourceId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.scheduledActionName, name: "scheduledActionName", parent: name, max: 1600)
            try self.validate(self.scheduledActionName, name: "scheduledActionName", parent: name, min: 1)
            try self.validate(self.scheduledActionName, name: "scheduledActionName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceId = "ResourceId"
            case scalableDimension = "ScalableDimension"
            case scheduledActionName = "ScheduledActionName"
            case serviceNamespace = "ServiceNamespace"
        }
    }

    public struct DeleteScheduledActionResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeregisterScalableTargetRequest: AWSEncodableShape {
        /// The identifier of the resource associated with the scalable target. This string consists of the resource type and unique identifier.   ECS service - The resource type is service and the unique identifier is the cluster name   and service name. Example: service/my-cluster/my-service.   Spot Fleet - The resource type is spot-fleet-request and the unique identifier is the  Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.   EMR cluster - The resource type is instancegroup and the unique identifier is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.   AppStream 2.0 fleet - The resource type is fleet and the unique identifier is the fleet name. Example: fleet/sample-fleet.   DynamoDB table - The resource type is table and the unique identifier is the table name.  Example: table/my-table.   DynamoDB global secondary index - The resource type is index and the unique identifier is the index name.  Example: table/my-table/index/my-table-index.   Aurora DB cluster - The resource type is cluster and the unique identifier is the cluster name. Example: cluster:my-db-cluster.   SageMaker endpoint variant - The resource type is variant and the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.   Custom resources are not supported with a resource type. This parameter must specify the OutputValue from the CloudFormation template stack used to access the resources. The unique identifier is defined by the service provider. More information is available in our GitHub repository.   Amazon Comprehend document classification endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us-west-2:123456789012:document-classifier-endpoint/EXAMPLE.   Amazon Comprehend entity recognizer endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us-west-2:123456789012:entity-recognizer-endpoint/EXAMPLE.   Lambda provisioned concurrency - The resource type is function and the unique identifier is the function name with a function version or alias name suffix that is not $LATEST.  Example: function:my-function:prod or function:my-function:1.   Amazon Keyspaces table - The resource type is table and the unique identifier is the table name.  Example: keyspace/mykeyspace/table/mytable.   Amazon MSK cluster - The resource type and unique identifier are specified using the cluster ARN.  Example: arn:aws:kafka:us-east-1:123456789012:cluster/demo-cluster-1/6357e0b2-0e6a-4b86-a0b4-70df934c2e31-5.   Amazon ElastiCache replication group - The resource type is replication-group and the unique identifier is the replication group name. Example: replication-group/mycluster.   Amazon ElastiCache cache cluster - The resource type is cache-cluster and the unique identifier is the cache cluster name. Example: cache-cluster/mycluster.   Neptune cluster - The resource type is cluster and the unique identifier is the cluster name. Example: cluster:mycluster.   SageMaker serverless endpoint - The resource type is variant and the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.   SageMaker inference component - The resource type is inference-component and the unique identifier is the resource ID. Example: inference-component/my-inference-component.   Pool of WorkSpaces - The resource type is workspacespool and the unique identifier is the pool ID.  Example: workspacespool/wspool-123456.
        public let resourceId: String
        /// The scalable dimension associated with the scalable target. This string consists of the service namespace, resource type, and scaling property.    ecs:service:DesiredCount - The task count of an ECS service.    elasticmapreduce:instancegroup:InstanceCount - The instance count of an EMR Instance Group.    ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot Fleet.    appstream:fleet:DesiredCapacity - The capacity of an AppStream 2.0 fleet.    dynamodb:table:ReadCapacityUnits - The provisioned read capacity for a DynamoDB table.    dynamodb:table:WriteCapacityUnits - The provisioned write capacity for a DynamoDB table.    dynamodb:index:ReadCapacityUnits - The provisioned read capacity for a DynamoDB global secondary index.    dynamodb:index:WriteCapacityUnits - The provisioned write capacity for a DynamoDB global secondary index.    rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora DB cluster. Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible edition.    sagemaker:variant:DesiredInstanceCount - The number of EC2 instances for a SageMaker model endpoint variant.    custom-resource:ResourceType:Property - The scalable dimension for a custom resource provided by your own application or service.    comprehend:document-classifier-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend document classification endpoint.    comprehend:entity-recognizer-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend entity recognizer endpoint.    lambda:function:ProvisionedConcurrency - The provisioned concurrency for a Lambda function.    cassandra:table:ReadCapacityUnits - The provisioned read capacity for an Amazon Keyspaces table.    cassandra:table:WriteCapacityUnits - The provisioned write capacity for an Amazon Keyspaces table.    kafka:broker-storage:VolumeSize - The provisioned volume size (in GiB) for brokers in an Amazon MSK cluster.    elasticache:cache-cluster:Nodes - The number of nodes for an Amazon ElastiCache cache cluster.    elasticache:replication-group:NodeGroups - The number of node groups for an Amazon ElastiCache replication group.    elasticache:replication-group:Replicas - The number of replicas per node group for an Amazon ElastiCache replication group.    neptune:cluster:ReadReplicaCount - The count of read replicas in an Amazon Neptune DB cluster.    sagemaker:variant:DesiredProvisionedConcurrency - The provisioned concurrency for a SageMaker serverless endpoint.    sagemaker:inference-component:DesiredCopyCount - The number of copies across an endpoint for a SageMaker inference component.    workspaces:workspacespool:DesiredUserSessions - The number of user sessions for the WorkSpaces in the pool.
        public let scalableDimension: ScalableDimension
        /// The namespace of the Amazon Web Services service that provides the resource. For a resource provided by your own application or service, use custom-resource instead.
        public let serviceNamespace: ServiceNamespace

        @inlinable
        public init(resourceId: String, scalableDimension: ScalableDimension, serviceNamespace: ServiceNamespace) {
            self.resourceId = resourceId
            self.scalableDimension = scalableDimension
            self.serviceNamespace = serviceNamespace
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceId, name: "resourceId", parent: name, max: 1600)
            try self.validate(self.resourceId, name: "resourceId", parent: name, min: 1)
            try self.validate(self.resourceId, name: "resourceId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceId = "ResourceId"
            case scalableDimension = "ScalableDimension"
            case serviceNamespace = "ServiceNamespace"
        }
    }

    public struct DeregisterScalableTargetResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DescribeScalableTargetsRequest: AWSEncodableShape {
        /// The maximum number of scalable targets. This value can be between 1 and 50. The default value is 50. If this parameter is used, the operation returns up to MaxResults results at a time, along with a NextToken value. To get the next set of results, include the NextToken value in a subsequent call. If this parameter is not used, the operation returns up to 50 results and a NextToken value, if applicable.
        public let maxResults: Int?
        /// The token for the next set of results.
        public let nextToken: String?
        /// The identifier of the resource associated with the scalable target. This string consists of the resource type and unique identifier.   ECS service - The resource type is service and the unique identifier is the cluster name   and service name. Example: service/my-cluster/my-service.   Spot Fleet - The resource type is spot-fleet-request and the unique identifier is the  Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.   EMR cluster - The resource type is instancegroup and the unique identifier is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.   AppStream 2.0 fleet - The resource type is fleet and the unique identifier is the fleet name. Example: fleet/sample-fleet.   DynamoDB table - The resource type is table and the unique identifier is the table name.  Example: table/my-table.   DynamoDB global secondary index - The resource type is index and the unique identifier is the index name.  Example: table/my-table/index/my-table-index.   Aurora DB cluster - The resource type is cluster and the unique identifier is the cluster name. Example: cluster:my-db-cluster.   SageMaker endpoint variant - The resource type is variant and the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.   Custom resources are not supported with a resource type. This parameter must specify the OutputValue from the CloudFormation template stack used to access the resources. The unique identifier is defined by the service provider. More information is available in our GitHub repository.   Amazon Comprehend document classification endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us-west-2:123456789012:document-classifier-endpoint/EXAMPLE.   Amazon Comprehend entity recognizer endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us-west-2:123456789012:entity-recognizer-endpoint/EXAMPLE.   Lambda provisioned concurrency - The resource type is function and the unique identifier is the function name with a function version or alias name suffix that is not $LATEST.  Example: function:my-function:prod or function:my-function:1.   Amazon Keyspaces table - The resource type is table and the unique identifier is the table name.  Example: keyspace/mykeyspace/table/mytable.   Amazon MSK cluster - The resource type and unique identifier are specified using the cluster ARN.  Example: arn:aws:kafka:us-east-1:123456789012:cluster/demo-cluster-1/6357e0b2-0e6a-4b86-a0b4-70df934c2e31-5.   Amazon ElastiCache replication group - The resource type is replication-group and the unique identifier is the replication group name. Example: replication-group/mycluster.   Amazon ElastiCache cache cluster - The resource type is cache-cluster and the unique identifier is the cache cluster name. Example: cache-cluster/mycluster.   Neptune cluster - The resource type is cluster and the unique identifier is the cluster name. Example: cluster:mycluster.   SageMaker serverless endpoint - The resource type is variant and the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.   SageMaker inference component - The resource type is inference-component and the unique identifier is the resource ID. Example: inference-component/my-inference-component.   Pool of WorkSpaces - The resource type is workspacespool and the unique identifier is the pool ID.  Example: workspacespool/wspool-123456.
        public let resourceIds: [String]?
        /// The scalable dimension associated with the scalable target. This string consists of the service namespace, resource type, and scaling property. If you specify a scalable dimension, you must also specify a resource ID.    ecs:service:DesiredCount - The task count of an ECS service.    elasticmapreduce:instancegroup:InstanceCount - The instance count of an EMR Instance Group.    ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot Fleet.    appstream:fleet:DesiredCapacity - The capacity of an AppStream 2.0 fleet.    dynamodb:table:ReadCapacityUnits - The provisioned read capacity for a DynamoDB table.    dynamodb:table:WriteCapacityUnits - The provisioned write capacity for a DynamoDB table.    dynamodb:index:ReadCapacityUnits - The provisioned read capacity for a DynamoDB global secondary index.    dynamodb:index:WriteCapacityUnits - The provisioned write capacity for a DynamoDB global secondary index.    rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora DB cluster. Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible edition.    sagemaker:variant:DesiredInstanceCount - The number of EC2 instances for a SageMaker model endpoint variant.    custom-resource:ResourceType:Property - The scalable dimension for a custom resource provided by your own application or service.    comprehend:document-classifier-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend document classification endpoint.    comprehend:entity-recognizer-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend entity recognizer endpoint.    lambda:function:ProvisionedConcurrency - The provisioned concurrency for a Lambda function.    cassandra:table:ReadCapacityUnits - The provisioned read capacity for an Amazon Keyspaces table.    cassandra:table:WriteCapacityUnits - The provisioned write capacity for an Amazon Keyspaces table.    kafka:broker-storage:VolumeSize - The provisioned volume size (in GiB) for brokers in an Amazon MSK cluster.    elasticache:cache-cluster:Nodes - The number of nodes for an Amazon ElastiCache cache cluster.    elasticache:replication-group:NodeGroups - The number of node groups for an Amazon ElastiCache replication group.    elasticache:replication-group:Replicas - The number of replicas per node group for an Amazon ElastiCache replication group.    neptune:cluster:ReadReplicaCount - The count of read replicas in an Amazon Neptune DB cluster.    sagemaker:variant:DesiredProvisionedConcurrency - The provisioned concurrency for a SageMaker serverless endpoint.    sagemaker:inference-component:DesiredCopyCount - The number of copies across an endpoint for a SageMaker inference component.    workspaces:workspacespool:DesiredUserSessions - The number of user sessions for the WorkSpaces in the pool.
        public let scalableDimension: ScalableDimension?
        /// The namespace of the Amazon Web Services service that provides the resource. For a resource provided by your own application or service, use custom-resource instead.
        public let serviceNamespace: ServiceNamespace

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, resourceIds: [String]? = nil, scalableDimension: ScalableDimension? = nil, serviceNamespace: ServiceNamespace) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resourceIds = resourceIds
            self.scalableDimension = scalableDimension
            self.serviceNamespace = serviceNamespace
        }

        public func validate(name: String) throws {
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.resourceIds?.forEach {
                try validate($0, name: "resourceIds[]", parent: name, max: 1600)
                try validate($0, name: "resourceIds[]", parent: name, min: 1)
                try validate($0, name: "resourceIds[]", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            }
            try self.validate(self.resourceIds, name: "resourceIds", parent: name, max: 50)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case resourceIds = "ResourceIds"
            case scalableDimension = "ScalableDimension"
            case serviceNamespace = "ServiceNamespace"
        }
    }

    public struct DescribeScalableTargetsResponse: AWSDecodableShape {
        /// The token required to get the next set of results. This value is null if there are no more results to return.
        public let nextToken: String?
        /// The scalable targets that match the request parameters.
        public let scalableTargets: [ScalableTarget]?

        @inlinable
        public init(nextToken: String? = nil, scalableTargets: [ScalableTarget]? = nil) {
            self.nextToken = nextToken
            self.scalableTargets = scalableTargets
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case scalableTargets = "ScalableTargets"
        }
    }

    public struct DescribeScalingActivitiesRequest: AWSEncodableShape {
        /// Specifies whether to include activities that aren't scaled (not scaled activities) in the response. Not scaled activities are activities that aren't completed or started for various reasons, such as preventing infinite scaling loops. For help interpreting the not scaled reason details in the response, see Scaling activities for Application Auto Scaling.
        public let includeNotScaledActivities: Bool?
        /// The maximum number of scalable targets. This value can be between 1 and 50. The default value is 50. If this parameter is used, the operation returns up to MaxResults results at a time, along with a NextToken value. To get the next set of results, include the NextToken value in a subsequent call. If this parameter is not used, the operation returns up to 50 results and a NextToken value, if applicable.
        public let maxResults: Int?
        /// The token for the next set of results.
        public let nextToken: String?
        /// The identifier of the resource associated with the scaling activity. This string consists of the resource type and unique identifier.   ECS service - The resource type is service and the unique identifier is the cluster name   and service name. Example: service/my-cluster/my-service.   Spot Fleet - The resource type is spot-fleet-request and the unique identifier is the  Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.   EMR cluster - The resource type is instancegroup and the unique identifier is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.   AppStream 2.0 fleet - The resource type is fleet and the unique identifier is the fleet name. Example: fleet/sample-fleet.   DynamoDB table - The resource type is table and the unique identifier is the table name.  Example: table/my-table.   DynamoDB global secondary index - The resource type is index and the unique identifier is the index name.  Example: table/my-table/index/my-table-index.   Aurora DB cluster - The resource type is cluster and the unique identifier is the cluster name. Example: cluster:my-db-cluster.   SageMaker endpoint variant - The resource type is variant and the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.   Custom resources are not supported with a resource type. This parameter must specify the OutputValue from the CloudFormation template stack used to access the resources. The unique identifier is defined by the service provider. More information is available in our GitHub repository.   Amazon Comprehend document classification endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us-west-2:123456789012:document-classifier-endpoint/EXAMPLE.   Amazon Comprehend entity recognizer endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us-west-2:123456789012:entity-recognizer-endpoint/EXAMPLE.   Lambda provisioned concurrency - The resource type is function and the unique identifier is the function name with a function version or alias name suffix that is not $LATEST.  Example: function:my-function:prod or function:my-function:1.   Amazon Keyspaces table - The resource type is table and the unique identifier is the table name.  Example: keyspace/mykeyspace/table/mytable.   Amazon MSK cluster - The resource type and unique identifier are specified using the cluster ARN.  Example: arn:aws:kafka:us-east-1:123456789012:cluster/demo-cluster-1/6357e0b2-0e6a-4b86-a0b4-70df934c2e31-5.   Amazon ElastiCache replication group - The resource type is replication-group and the unique identifier is the replication group name. Example: replication-group/mycluster.   Amazon ElastiCache cache cluster - The resource type is cache-cluster and the unique identifier is the cache cluster name. Example: cache-cluster/mycluster.   Neptune cluster - The resource type is cluster and the unique identifier is the cluster name. Example: cluster:mycluster.   SageMaker serverless endpoint - The resource type is variant and the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.   SageMaker inference component - The resource type is inference-component and the unique identifier is the resource ID. Example: inference-component/my-inference-component.   Pool of WorkSpaces - The resource type is workspacespool and the unique identifier is the pool ID.  Example: workspacespool/wspool-123456.
        public let resourceId: String?
        /// The scalable dimension. This string consists of the service namespace, resource type, and scaling property. If you specify a scalable dimension, you must also specify a resource ID.    ecs:service:DesiredCount - The task count of an ECS service.    elasticmapreduce:instancegroup:InstanceCount - The instance count of an EMR Instance Group.    ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot Fleet.    appstream:fleet:DesiredCapacity - The capacity of an AppStream 2.0 fleet.    dynamodb:table:ReadCapacityUnits - The provisioned read capacity for a DynamoDB table.    dynamodb:table:WriteCapacityUnits - The provisioned write capacity for a DynamoDB table.    dynamodb:index:ReadCapacityUnits - The provisioned read capacity for a DynamoDB global secondary index.    dynamodb:index:WriteCapacityUnits - The provisioned write capacity for a DynamoDB global secondary index.    rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora DB cluster. Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible edition.    sagemaker:variant:DesiredInstanceCount - The number of EC2 instances for a SageMaker model endpoint variant.    custom-resource:ResourceType:Property - The scalable dimension for a custom resource provided by your own application or service.    comprehend:document-classifier-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend document classification endpoint.    comprehend:entity-recognizer-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend entity recognizer endpoint.    lambda:function:ProvisionedConcurrency - The provisioned concurrency for a Lambda function.    cassandra:table:ReadCapacityUnits - The provisioned read capacity for an Amazon Keyspaces table.    cassandra:table:WriteCapacityUnits - The provisioned write capacity for an Amazon Keyspaces table.    kafka:broker-storage:VolumeSize - The provisioned volume size (in GiB) for brokers in an Amazon MSK cluster.    elasticache:cache-cluster:Nodes - The number of nodes for an Amazon ElastiCache cache cluster.    elasticache:replication-group:NodeGroups - The number of node groups for an Amazon ElastiCache replication group.    elasticache:replication-group:Replicas - The number of replicas per node group for an Amazon ElastiCache replication group.    neptune:cluster:ReadReplicaCount - The count of read replicas in an Amazon Neptune DB cluster.    sagemaker:variant:DesiredProvisionedConcurrency - The provisioned concurrency for a SageMaker serverless endpoint.    sagemaker:inference-component:DesiredCopyCount - The number of copies across an endpoint for a SageMaker inference component.    workspaces:workspacespool:DesiredUserSessions - The number of user sessions for the WorkSpaces in the pool.
        public let scalableDimension: ScalableDimension?
        /// The namespace of the Amazon Web Services service that provides the resource. For a resource provided by your own application or service, use custom-resource instead.
        public let serviceNamespace: ServiceNamespace

        @inlinable
        public init(includeNotScaledActivities: Bool? = nil, maxResults: Int? = nil, nextToken: String? = nil, resourceId: String? = nil, scalableDimension: ScalableDimension? = nil, serviceNamespace: ServiceNamespace) {
            self.includeNotScaledActivities = includeNotScaledActivities
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resourceId = resourceId
            self.scalableDimension = scalableDimension
            self.serviceNamespace = serviceNamespace
        }

        public func validate(name: String) throws {
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.resourceId, name: "resourceId", parent: name, max: 1600)
            try self.validate(self.resourceId, name: "resourceId", parent: name, min: 1)
            try self.validate(self.resourceId, name: "resourceId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case includeNotScaledActivities = "IncludeNotScaledActivities"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case resourceId = "ResourceId"
            case scalableDimension = "ScalableDimension"
            case serviceNamespace = "ServiceNamespace"
        }
    }

    public struct DescribeScalingActivitiesResponse: AWSDecodableShape {
        /// The token required to get the next set of results. This value is null if there are no more results to return.
        public let nextToken: String?
        /// A list of scaling activity objects.
        public let scalingActivities: [ScalingActivity]?

        @inlinable
        public init(nextToken: String? = nil, scalingActivities: [ScalingActivity]? = nil) {
            self.nextToken = nextToken
            self.scalingActivities = scalingActivities
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case scalingActivities = "ScalingActivities"
        }
    }

    public struct DescribeScalingPoliciesRequest: AWSEncodableShape {
        /// The maximum number of scalable targets. This value can be between 1 and 10. The default value is 10. If this parameter is used, the operation returns up to MaxResults results at a time, along with a NextToken value. To get the next set of results, include the NextToken value in a subsequent call. If this parameter is not used, the operation returns up to 10 results and a NextToken value, if applicable.
        public let maxResults: Int?
        /// The token for the next set of results.
        public let nextToken: String?
        /// The names of the scaling policies to describe.
        public let policyNames: [String]?
        /// The identifier of the resource associated with the scaling policy. This string consists of the resource type and unique identifier.   ECS service - The resource type is service and the unique identifier is the cluster name   and service name. Example: service/my-cluster/my-service.   Spot Fleet - The resource type is spot-fleet-request and the unique identifier is the  Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.   EMR cluster - The resource type is instancegroup and the unique identifier is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.   AppStream 2.0 fleet - The resource type is fleet and the unique identifier is the fleet name. Example: fleet/sample-fleet.   DynamoDB table - The resource type is table and the unique identifier is the table name.  Example: table/my-table.   DynamoDB global secondary index - The resource type is index and the unique identifier is the index name.  Example: table/my-table/index/my-table-index.   Aurora DB cluster - The resource type is cluster and the unique identifier is the cluster name. Example: cluster:my-db-cluster.   SageMaker endpoint variant - The resource type is variant and the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.   Custom resources are not supported with a resource type. This parameter must specify the OutputValue from the CloudFormation template stack used to access the resources. The unique identifier is defined by the service provider. More information is available in our GitHub repository.   Amazon Comprehend document classification endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us-west-2:123456789012:document-classifier-endpoint/EXAMPLE.   Amazon Comprehend entity recognizer endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us-west-2:123456789012:entity-recognizer-endpoint/EXAMPLE.   Lambda provisioned concurrency - The resource type is function and the unique identifier is the function name with a function version or alias name suffix that is not $LATEST.  Example: function:my-function:prod or function:my-function:1.   Amazon Keyspaces table - The resource type is table and the unique identifier is the table name.  Example: keyspace/mykeyspace/table/mytable.   Amazon MSK cluster - The resource type and unique identifier are specified using the cluster ARN.  Example: arn:aws:kafka:us-east-1:123456789012:cluster/demo-cluster-1/6357e0b2-0e6a-4b86-a0b4-70df934c2e31-5.   Amazon ElastiCache replication group - The resource type is replication-group and the unique identifier is the replication group name. Example: replication-group/mycluster.   Amazon ElastiCache cache cluster - The resource type is cache-cluster and the unique identifier is the cache cluster name. Example: cache-cluster/mycluster.   Neptune cluster - The resource type is cluster and the unique identifier is the cluster name. Example: cluster:mycluster.   SageMaker serverless endpoint - The resource type is variant and the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.   SageMaker inference component - The resource type is inference-component and the unique identifier is the resource ID. Example: inference-component/my-inference-component.   Pool of WorkSpaces - The resource type is workspacespool and the unique identifier is the pool ID.  Example: workspacespool/wspool-123456.
        public let resourceId: String?
        /// The scalable dimension. This string consists of the service namespace, resource type, and scaling property. If you specify a scalable dimension, you must also specify a resource ID.    ecs:service:DesiredCount - The task count of an ECS service.    elasticmapreduce:instancegroup:InstanceCount - The instance count of an EMR Instance Group.    ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot Fleet.    appstream:fleet:DesiredCapacity - The capacity of an AppStream 2.0 fleet.    dynamodb:table:ReadCapacityUnits - The provisioned read capacity for a DynamoDB table.    dynamodb:table:WriteCapacityUnits - The provisioned write capacity for a DynamoDB table.    dynamodb:index:ReadCapacityUnits - The provisioned read capacity for a DynamoDB global secondary index.    dynamodb:index:WriteCapacityUnits - The provisioned write capacity for a DynamoDB global secondary index.    rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora DB cluster. Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible edition.    sagemaker:variant:DesiredInstanceCount - The number of EC2 instances for a SageMaker model endpoint variant.    custom-resource:ResourceType:Property - The scalable dimension for a custom resource provided by your own application or service.    comprehend:document-classifier-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend document classification endpoint.    comprehend:entity-recognizer-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend entity recognizer endpoint.    lambda:function:ProvisionedConcurrency - The provisioned concurrency for a Lambda function.    cassandra:table:ReadCapacityUnits - The provisioned read capacity for an Amazon Keyspaces table.    cassandra:table:WriteCapacityUnits - The provisioned write capacity for an Amazon Keyspaces table.    kafka:broker-storage:VolumeSize - The provisioned volume size (in GiB) for brokers in an Amazon MSK cluster.    elasticache:cache-cluster:Nodes - The number of nodes for an Amazon ElastiCache cache cluster.    elasticache:replication-group:NodeGroups - The number of node groups for an Amazon ElastiCache replication group.    elasticache:replication-group:Replicas - The number of replicas per node group for an Amazon ElastiCache replication group.    neptune:cluster:ReadReplicaCount - The count of read replicas in an Amazon Neptune DB cluster.    sagemaker:variant:DesiredProvisionedConcurrency - The provisioned concurrency for a SageMaker serverless endpoint.    sagemaker:inference-component:DesiredCopyCount - The number of copies across an endpoint for a SageMaker inference component.    workspaces:workspacespool:DesiredUserSessions - The number of user sessions for the WorkSpaces in the pool.
        public let scalableDimension: ScalableDimension?
        /// The namespace of the Amazon Web Services service that provides the resource. For a resource provided by your own application or service, use custom-resource instead.
        public let serviceNamespace: ServiceNamespace

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, policyNames: [String]? = nil, resourceId: String? = nil, scalableDimension: ScalableDimension? = nil, serviceNamespace: ServiceNamespace) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.policyNames = policyNames
            self.resourceId = resourceId
            self.scalableDimension = scalableDimension
            self.serviceNamespace = serviceNamespace
        }

        public func validate(name: String) throws {
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.policyNames?.forEach {
                try validate($0, name: "policyNames[]", parent: name, max: 1600)
                try validate($0, name: "policyNames[]", parent: name, min: 1)
                try validate($0, name: "policyNames[]", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            }
            try self.validate(self.policyNames, name: "policyNames", parent: name, max: 50)
            try self.validate(self.resourceId, name: "resourceId", parent: name, max: 1600)
            try self.validate(self.resourceId, name: "resourceId", parent: name, min: 1)
            try self.validate(self.resourceId, name: "resourceId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case policyNames = "PolicyNames"
            case resourceId = "ResourceId"
            case scalableDimension = "ScalableDimension"
            case serviceNamespace = "ServiceNamespace"
        }
    }

    public struct DescribeScalingPoliciesResponse: AWSDecodableShape {
        /// The token required to get the next set of results. This value is null if there are no more results to return.
        public let nextToken: String?
        /// Information about the scaling policies.
        public let scalingPolicies: [ScalingPolicy]?

        @inlinable
        public init(nextToken: String? = nil, scalingPolicies: [ScalingPolicy]? = nil) {
            self.nextToken = nextToken
            self.scalingPolicies = scalingPolicies
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case scalingPolicies = "ScalingPolicies"
        }
    }

    public struct DescribeScheduledActionsRequest: AWSEncodableShape {
        /// The maximum number of scheduled action results. This value can be between 1 and 50. The default value is 50. If this parameter is used, the operation returns up to MaxResults results at a time, along with a NextToken value. To get the next set of results, include the NextToken value in a subsequent call. If this parameter is not used, the operation returns up to 50 results and a NextToken value, if applicable.
        public let maxResults: Int?
        /// The token for the next set of results.
        public let nextToken: String?
        /// The identifier of the resource associated with the scheduled action. This string consists of the resource type and unique identifier.   ECS service - The resource type is service and the unique identifier is the cluster name   and service name. Example: service/my-cluster/my-service.   Spot Fleet - The resource type is spot-fleet-request and the unique identifier is the  Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.   EMR cluster - The resource type is instancegroup and the unique identifier is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.   AppStream 2.0 fleet - The resource type is fleet and the unique identifier is the fleet name. Example: fleet/sample-fleet.   DynamoDB table - The resource type is table and the unique identifier is the table name.  Example: table/my-table.   DynamoDB global secondary index - The resource type is index and the unique identifier is the index name.  Example: table/my-table/index/my-table-index.   Aurora DB cluster - The resource type is cluster and the unique identifier is the cluster name. Example: cluster:my-db-cluster.   SageMaker endpoint variant - The resource type is variant and the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.   Custom resources are not supported with a resource type. This parameter must specify the OutputValue from the CloudFormation template stack used to access the resources. The unique identifier is defined by the service provider. More information is available in our GitHub repository.   Amazon Comprehend document classification endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us-west-2:123456789012:document-classifier-endpoint/EXAMPLE.   Amazon Comprehend entity recognizer endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us-west-2:123456789012:entity-recognizer-endpoint/EXAMPLE.   Lambda provisioned concurrency - The resource type is function and the unique identifier is the function name with a function version or alias name suffix that is not $LATEST.  Example: function:my-function:prod or function:my-function:1.   Amazon Keyspaces table - The resource type is table and the unique identifier is the table name.  Example: keyspace/mykeyspace/table/mytable.   Amazon MSK cluster - The resource type and unique identifier are specified using the cluster ARN.  Example: arn:aws:kafka:us-east-1:123456789012:cluster/demo-cluster-1/6357e0b2-0e6a-4b86-a0b4-70df934c2e31-5.   Amazon ElastiCache replication group - The resource type is replication-group and the unique identifier is the replication group name. Example: replication-group/mycluster.   Amazon ElastiCache cache cluster - The resource type is cache-cluster and the unique identifier is the cache cluster name. Example: cache-cluster/mycluster.   Neptune cluster - The resource type is cluster and the unique identifier is the cluster name. Example: cluster:mycluster.   SageMaker serverless endpoint - The resource type is variant and the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.   SageMaker inference component - The resource type is inference-component and the unique identifier is the resource ID. Example: inference-component/my-inference-component.   Pool of WorkSpaces - The resource type is workspacespool and the unique identifier is the pool ID.  Example: workspacespool/wspool-123456.
        public let resourceId: String?
        /// The scalable dimension. This string consists of the service namespace, resource type, and scaling property. If you specify a scalable dimension, you must also specify a resource ID.    ecs:service:DesiredCount - The task count of an ECS service.    elasticmapreduce:instancegroup:InstanceCount - The instance count of an EMR Instance Group.    ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot Fleet.    appstream:fleet:DesiredCapacity - The capacity of an AppStream 2.0 fleet.    dynamodb:table:ReadCapacityUnits - The provisioned read capacity for a DynamoDB table.    dynamodb:table:WriteCapacityUnits - The provisioned write capacity for a DynamoDB table.    dynamodb:index:ReadCapacityUnits - The provisioned read capacity for a DynamoDB global secondary index.    dynamodb:index:WriteCapacityUnits - The provisioned write capacity for a DynamoDB global secondary index.    rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora DB cluster. Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible edition.    sagemaker:variant:DesiredInstanceCount - The number of EC2 instances for a SageMaker model endpoint variant.    custom-resource:ResourceType:Property - The scalable dimension for a custom resource provided by your own application or service.    comprehend:document-classifier-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend document classification endpoint.    comprehend:entity-recognizer-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend entity recognizer endpoint.    lambda:function:ProvisionedConcurrency - The provisioned concurrency for a Lambda function.    cassandra:table:ReadCapacityUnits - The provisioned read capacity for an Amazon Keyspaces table.    cassandra:table:WriteCapacityUnits - The provisioned write capacity for an Amazon Keyspaces table.    kafka:broker-storage:VolumeSize - The provisioned volume size (in GiB) for brokers in an Amazon MSK cluster.    elasticache:cache-cluster:Nodes - The number of nodes for an Amazon ElastiCache cache cluster.    elasticache:replication-group:NodeGroups - The number of node groups for an Amazon ElastiCache replication group.    elasticache:replication-group:Replicas - The number of replicas per node group for an Amazon ElastiCache replication group.    neptune:cluster:ReadReplicaCount - The count of read replicas in an Amazon Neptune DB cluster.    sagemaker:variant:DesiredProvisionedConcurrency - The provisioned concurrency for a SageMaker serverless endpoint.    sagemaker:inference-component:DesiredCopyCount - The number of copies across an endpoint for a SageMaker inference component.    workspaces:workspacespool:DesiredUserSessions - The number of user sessions for the WorkSpaces in the pool.
        public let scalableDimension: ScalableDimension?
        /// The names of the scheduled actions to describe.
        public let scheduledActionNames: [String]?
        /// The namespace of the Amazon Web Services service that provides the resource. For a resource provided by your own application or service, use custom-resource instead.
        public let serviceNamespace: ServiceNamespace

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, resourceId: String? = nil, scalableDimension: ScalableDimension? = nil, scheduledActionNames: [String]? = nil, serviceNamespace: ServiceNamespace) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resourceId = resourceId
            self.scalableDimension = scalableDimension
            self.scheduledActionNames = scheduledActionNames
            self.serviceNamespace = serviceNamespace
        }

        public func validate(name: String) throws {
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.resourceId, name: "resourceId", parent: name, max: 1600)
            try self.validate(self.resourceId, name: "resourceId", parent: name, min: 1)
            try self.validate(self.resourceId, name: "resourceId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.scheduledActionNames?.forEach {
                try validate($0, name: "scheduledActionNames[]", parent: name, max: 1600)
                try validate($0, name: "scheduledActionNames[]", parent: name, min: 1)
                try validate($0, name: "scheduledActionNames[]", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            }
            try self.validate(self.scheduledActionNames, name: "scheduledActionNames", parent: name, max: 50)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case resourceId = "ResourceId"
            case scalableDimension = "ScalableDimension"
            case scheduledActionNames = "ScheduledActionNames"
            case serviceNamespace = "ServiceNamespace"
        }
    }

    public struct DescribeScheduledActionsResponse: AWSDecodableShape {
        /// The token required to get the next set of results. This value is null if there are no more results to return.
        public let nextToken: String?
        /// Information about the scheduled actions.
        public let scheduledActions: [ScheduledAction]?

        @inlinable
        public init(nextToken: String? = nil, scheduledActions: [ScheduledAction]? = nil) {
            self.nextToken = nextToken
            self.scheduledActions = scheduledActions
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case scheduledActions = "ScheduledActions"
        }
    }

    public struct GetPredictiveScalingForecastRequest: AWSEncodableShape {
        ///  The exclusive end time of the time range for the forecast data to get. The maximum time duration between the start and end time is 30 days.
        public let endTime: Date
        /// The name of the policy.
        public let policyName: String
        ///  The identifier of the resource.
        public let resourceId: String
        ///  The scalable dimension.
        public let scalableDimension: ScalableDimension
        ///  The namespace of the Amazon Web Services service that provides the resource. For a resource provided by your own application or service, use custom-resource instead.
        public let serviceNamespace: ServiceNamespace
        ///  The inclusive start time of the time range for the forecast data to get. At most, the date and time can be one year before the current date and time
        public let startTime: Date

        @inlinable
        public init(endTime: Date, policyName: String, resourceId: String, scalableDimension: ScalableDimension, serviceNamespace: ServiceNamespace, startTime: Date) {
            self.endTime = endTime
            self.policyName = policyName
            self.resourceId = resourceId
            self.scalableDimension = scalableDimension
            self.serviceNamespace = serviceNamespace
            self.startTime = startTime
        }

        public func validate(name: String) throws {
            try self.validate(self.policyName, name: "policyName", parent: name, max: 256)
            try self.validate(self.policyName, name: "policyName", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "^\\p{Print}+$")
            try self.validate(self.resourceId, name: "resourceId", parent: name, max: 1600)
            try self.validate(self.resourceId, name: "resourceId", parent: name, min: 1)
            try self.validate(self.resourceId, name: "resourceId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case endTime = "EndTime"
            case policyName = "PolicyName"
            case resourceId = "ResourceId"
            case scalableDimension = "ScalableDimension"
            case serviceNamespace = "ServiceNamespace"
            case startTime = "StartTime"
        }
    }

    public struct GetPredictiveScalingForecastResponse: AWSDecodableShape {
        ///  The capacity forecast.
        public let capacityForecast: CapacityForecast?
        ///  The load forecast.
        public let loadForecast: [LoadForecast]?
        ///  The time the forecast was made.
        public let updateTime: Date?

        @inlinable
        public init(capacityForecast: CapacityForecast? = nil, loadForecast: [LoadForecast]? = nil, updateTime: Date? = nil) {
            self.capacityForecast = capacityForecast
            self.loadForecast = loadForecast
            self.updateTime = updateTime
        }

        private enum CodingKeys: String, CodingKey {
            case capacityForecast = "CapacityForecast"
            case loadForecast = "LoadForecast"
            case updateTime = "UpdateTime"
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        /// Specify the ARN of the scalable target. For example: arn:aws:application-autoscaling:us-east-1:123456789012:scalable-target/1234abcd56ab78cd901ef1234567890ab123  To get the ARN for a scalable target, use DescribeScalableTargets.
        public let resourceARN: String

        @inlinable
        public init(resourceARN: String) {
            self.resourceARN = resourceARN
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 1011)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 1)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, pattern: "^arn:.+:application-autoscaling:.+:[0-9]+:scalable-target\\/[a-zA-Z0-9-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
        }
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// A list of tags. Each tag consists of a tag key and a tag value.
        public let tags: [String: String]?

        @inlinable
        public init(tags: [String: String]? = nil) {
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "Tags"
        }
    }

    public struct LoadForecast: AWSDecodableShape {
        ///  The metric specification for the load forecast.
        public let metricSpecification: PredictiveScalingMetricSpecification
        ///  The timestamps for the data points, in UTC format.
        public let timestamps: [Date]
        ///  The values of the data points.
        public let values: [Double]

        @inlinable
        public init(metricSpecification: PredictiveScalingMetricSpecification, timestamps: [Date], values: [Double]) {
            self.metricSpecification = metricSpecification
            self.timestamps = timestamps
            self.values = values
        }

        private enum CodingKeys: String, CodingKey {
            case metricSpecification = "MetricSpecification"
            case timestamps = "Timestamps"
            case values = "Values"
        }
    }

    public struct MetricDimension: AWSEncodableShape & AWSDecodableShape {
        /// The name of the dimension.
        public let name: String
        /// The value of the dimension.
        public let value: String

        @inlinable
        public init(name: String, value: String) {
            self.name = name
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case value = "Value"
        }
    }

    public struct NotScaledReason: AWSDecodableShape {
        /// A code that represents the reason for not scaling. Valid values:   AutoScalingAnticipatedFlapping   TargetServicePutResourceAsUnscalable   AlreadyAtMaxCapacity   AlreadyAtMinCapacity   AlreadyAtDesiredCapacity
        public let code: String
        /// The current capacity.
        public let currentCapacity: Int?
        /// The maximum capacity.
        public let maxCapacity: Int?
        /// The minimum capacity.
        public let minCapacity: Int?

        @inlinable
        public init(code: String, currentCapacity: Int? = nil, maxCapacity: Int? = nil, minCapacity: Int? = nil) {
            self.code = code
            self.currentCapacity = currentCapacity
            self.maxCapacity = maxCapacity
            self.minCapacity = minCapacity
        }

        private enum CodingKeys: String, CodingKey {
            case code = "Code"
            case currentCapacity = "CurrentCapacity"
            case maxCapacity = "MaxCapacity"
            case minCapacity = "MinCapacity"
        }
    }

    public struct PredefinedMetricSpecification: AWSEncodableShape & AWSDecodableShape {
        /// The metric type. The ALBRequestCountPerTarget metric type applies only to Spot Fleets and ECS services.
        public let predefinedMetricType: MetricType
        /// Identifies the resource associated with the metric type. You can't specify a resource label unless the metric type is ALBRequestCountPerTarget and there is a target group attached to the Spot Fleet or ECS service. You create the resource label by appending the final portion of the load balancer ARN and the final portion of the target group ARN into a single value, separated by a forward slash (/). The format of the resource label is:  app/my-alb/778d41231b141a0f/targetgroup/my-alb-target-group/943f017f100becff. Where:   app// is the final portion of the load balancer ARN   targetgroup// is the final portion of the target group ARN.   To find the ARN for an Application Load Balancer, use the DescribeLoadBalancers API operation. To find the ARN for the target group, use the DescribeTargetGroups API operation.
        public let resourceLabel: String?

        @inlinable
        public init(predefinedMetricType: MetricType, resourceLabel: String? = nil) {
            self.predefinedMetricType = predefinedMetricType
            self.resourceLabel = resourceLabel
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceLabel, name: "resourceLabel", parent: name, max: 1023)
            try self.validate(self.resourceLabel, name: "resourceLabel", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case predefinedMetricType = "PredefinedMetricType"
            case resourceLabel = "ResourceLabel"
        }
    }

    public struct PredictiveScalingCustomizedMetricSpecification: AWSEncodableShape & AWSDecodableShape {
        ///  One or more metric data queries to provide data points for a metric specification.
        public let metricDataQueries: [PredictiveScalingMetricDataQuery]

        @inlinable
        public init(metricDataQueries: [PredictiveScalingMetricDataQuery]) {
            self.metricDataQueries = metricDataQueries
        }

        public func validate(name: String) throws {
            try self.metricDataQueries.forEach {
                try $0.validate(name: "\(name).metricDataQueries[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case metricDataQueries = "MetricDataQueries"
        }
    }

    public struct PredictiveScalingMetric: AWSEncodableShape & AWSDecodableShape {
        ///  Describes the dimensions of the metric.
        public let dimensions: [PredictiveScalingMetricDimension]?
        ///  The name of the metric.
        public let metricName: String?
        ///  The namespace of the metric.
        public let namespace: String?

        @inlinable
        public init(dimensions: [PredictiveScalingMetricDimension]? = nil, metricName: String? = nil, namespace: String? = nil) {
            self.dimensions = dimensions
            self.metricName = metricName
            self.namespace = namespace
        }

        public func validate(name: String) throws {
            try self.dimensions?.forEach {
                try $0.validate(name: "\(name).dimensions[]")
            }
            try self.validate(self.metricName, name: "metricName", parent: name, max: 255)
            try self.validate(self.metricName, name: "metricName", parent: name, min: 1)
            try self.validate(self.metricName, name: "metricName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.namespace, name: "namespace", parent: name, max: 255)
            try self.validate(self.namespace, name: "namespace", parent: name, min: 1)
            try self.validate(self.namespace, name: "namespace", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case dimensions = "Dimensions"
            case metricName = "MetricName"
            case namespace = "Namespace"
        }
    }

    public struct PredictiveScalingMetricDataQuery: AWSEncodableShape & AWSDecodableShape {
        ///  The math expression to perform on the returned data, if this object is performing a math expression. This expression can use the Id of the other metrics to refer to those metrics, and can also use the Id of other expressions to use the result of those expressions.  Conditional: Within each MetricDataQuery object, you must specify either Expression or MetricStat, but not both.
        public let expression: String?
        ///  A short name that identifies the object's results in the response. This name must be unique among all MetricDataQuery objects specified for a single scaling policy. If you are performing math expressions on this set of data, this name represents that data and can serve as a variable in the mathematical expression. The valid characters are letters, numbers, and underscores. The first character must be a lowercase letter.
        public let id: String
        ///  A human-readable label for this metric or expression. This is especially useful if this is a math expression, so that you know what the value represents.
        public let label: String?
        ///  Information about the metric data to return.  Conditional: Within each MetricDataQuery object, you must specify either Expression or MetricStat, but not both.
        public let metricStat: PredictiveScalingMetricStat?
        ///  Indicates whether to return the timestamps and raw data values of this metric.  If you use any math expressions, specify true for this value for only the final math expression that the metric specification is based on. You must specify false for ReturnData for all the other metrics and expressions used in the metric specification. If you are only retrieving metrics and not performing any math expressions, do not specify anything for ReturnData. This sets it to its default (true).
        public let returnData: Bool?

        @inlinable
        public init(expression: String? = nil, id: String, label: String? = nil, metricStat: PredictiveScalingMetricStat? = nil, returnData: Bool? = nil) {
            self.expression = expression
            self.id = id
            self.label = label
            self.metricStat = metricStat
            self.returnData = returnData
        }

        public func validate(name: String) throws {
            try self.validate(self.expression, name: "expression", parent: name, max: 2048)
            try self.validate(self.expression, name: "expression", parent: name, min: 1)
            try self.validate(self.expression, name: "expression", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.id, name: "id", parent: name, max: 255)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.label, name: "label", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.metricStat?.validate(name: "\(name).metricStat")
        }

        private enum CodingKeys: String, CodingKey {
            case expression = "Expression"
            case id = "Id"
            case label = "Label"
            case metricStat = "MetricStat"
            case returnData = "ReturnData"
        }
    }

    public struct PredictiveScalingMetricDimension: AWSEncodableShape & AWSDecodableShape {
        ///  The name of the dimension.
        public let name: String
        ///  The value of the dimension.
        public let value: String

        @inlinable
        public init(name: String, value: String) {
            self.name = name
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 255)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.value, name: "value", parent: name, max: 1024)
            try self.validate(self.value, name: "value", parent: name, min: 1)
            try self.validate(self.value, name: "value", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case value = "Value"
        }
    }

    public struct PredictiveScalingMetricSpecification: AWSEncodableShape & AWSDecodableShape {
        ///  The customized capacity metric specification.
        public let customizedCapacityMetricSpecification: PredictiveScalingCustomizedMetricSpecification?
        ///  The customized load metric specification.
        public let customizedLoadMetricSpecification: PredictiveScalingCustomizedMetricSpecification?
        ///  The customized scaling metric specification.
        public let customizedScalingMetricSpecification: PredictiveScalingCustomizedMetricSpecification?
        ///  The predefined load metric specification.
        public let predefinedLoadMetricSpecification: PredictiveScalingPredefinedLoadMetricSpecification?
        ///  The predefined metric pair specification that determines the appropriate scaling metric and load metric to use.
        public let predefinedMetricPairSpecification: PredictiveScalingPredefinedMetricPairSpecification?
        ///  The predefined scaling metric specification.
        public let predefinedScalingMetricSpecification: PredictiveScalingPredefinedScalingMetricSpecification?
        ///  Specifies the target utilization.
        public let targetValue: Double

        @inlinable
        public init(customizedCapacityMetricSpecification: PredictiveScalingCustomizedMetricSpecification? = nil, customizedLoadMetricSpecification: PredictiveScalingCustomizedMetricSpecification? = nil, customizedScalingMetricSpecification: PredictiveScalingCustomizedMetricSpecification? = nil, predefinedLoadMetricSpecification: PredictiveScalingPredefinedLoadMetricSpecification? = nil, predefinedMetricPairSpecification: PredictiveScalingPredefinedMetricPairSpecification? = nil, predefinedScalingMetricSpecification: PredictiveScalingPredefinedScalingMetricSpecification? = nil, targetValue: Double) {
            self.customizedCapacityMetricSpecification = customizedCapacityMetricSpecification
            self.customizedLoadMetricSpecification = customizedLoadMetricSpecification
            self.customizedScalingMetricSpecification = customizedScalingMetricSpecification
            self.predefinedLoadMetricSpecification = predefinedLoadMetricSpecification
            self.predefinedMetricPairSpecification = predefinedMetricPairSpecification
            self.predefinedScalingMetricSpecification = predefinedScalingMetricSpecification
            self.targetValue = targetValue
        }

        public func validate(name: String) throws {
            try self.customizedCapacityMetricSpecification?.validate(name: "\(name).customizedCapacityMetricSpecification")
            try self.customizedLoadMetricSpecification?.validate(name: "\(name).customizedLoadMetricSpecification")
            try self.customizedScalingMetricSpecification?.validate(name: "\(name).customizedScalingMetricSpecification")
            try self.predefinedLoadMetricSpecification?.validate(name: "\(name).predefinedLoadMetricSpecification")
            try self.predefinedMetricPairSpecification?.validate(name: "\(name).predefinedMetricPairSpecification")
            try self.predefinedScalingMetricSpecification?.validate(name: "\(name).predefinedScalingMetricSpecification")
        }

        private enum CodingKeys: String, CodingKey {
            case customizedCapacityMetricSpecification = "CustomizedCapacityMetricSpecification"
            case customizedLoadMetricSpecification = "CustomizedLoadMetricSpecification"
            case customizedScalingMetricSpecification = "CustomizedScalingMetricSpecification"
            case predefinedLoadMetricSpecification = "PredefinedLoadMetricSpecification"
            case predefinedMetricPairSpecification = "PredefinedMetricPairSpecification"
            case predefinedScalingMetricSpecification = "PredefinedScalingMetricSpecification"
            case targetValue = "TargetValue"
        }
    }

    public struct PredictiveScalingMetricStat: AWSEncodableShape & AWSDecodableShape {
        ///  The CloudWatch metric to return, including the metric name, namespace, and dimensions. To get the exact metric name, namespace, and dimensions, inspect the Metric object that is returned by a call to ListMetrics.
        public let metric: PredictiveScalingMetric
        ///  The statistic to return. It can include any CloudWatch statistic or extended statistic. For a list of valid values, see the table in Statistics in the Amazon CloudWatch User Guide.  The most commonly used metrics for predictive scaling are Average and Sum.
        public let stat: String
        ///  The unit to use for the returned data points. For a complete list of the units that CloudWatch supports, see the MetricDatum  data type in the Amazon CloudWatch API Reference.
        public let unit: String?

        @inlinable
        public init(metric: PredictiveScalingMetric, stat: String, unit: String? = nil) {
            self.metric = metric
            self.stat = stat
            self.unit = unit
        }

        public func validate(name: String) throws {
            try self.metric.validate(name: "\(name).metric")
            try self.validate(self.stat, name: "stat", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.unit, name: "unit", parent: name, max: 1023)
            try self.validate(self.unit, name: "unit", parent: name, min: 1)
            try self.validate(self.unit, name: "unit", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case metric = "Metric"
            case stat = "Stat"
            case unit = "Unit"
        }
    }

    public struct PredictiveScalingPolicyConfiguration: AWSEncodableShape & AWSDecodableShape {
        ///  Defines the behavior that should be applied if the forecast capacity approaches or exceeds the maximum capacity. Defaults to HonorMaxCapacity if not specified.
        public let maxCapacityBreachBehavior: PredictiveScalingMaxCapacityBreachBehavior?
        ///  The size of the capacity buffer to use when the forecast capacity is close to or exceeds the maximum capacity. The value is specified as a percentage relative to the forecast capacity. For example, if the buffer is 10, this means a 10 percent buffer, such that if the forecast capacity is 50, and the maximum capacity is 40, then the effective maximum capacity is 55.  Required if the MaxCapacityBreachBehavior property is set to IncreaseMaxCapacity, and cannot be used otherwise.
        public let maxCapacityBuffer: Int?
        ///  This structure includes the metrics and target utilization to use for predictive scaling.  This is an array, but we currently only support a single metric specification. That is, you can specify a target value and a single metric pair, or a target value and one scaling metric and one load metric.
        public let metricSpecifications: [PredictiveScalingMetricSpecification]
        ///  The predictive scaling mode. Defaults to ForecastOnly if not specified.
        public let mode: PredictiveScalingMode?
        ///  The amount of time, in seconds, that the start time can be advanced.  The value must be less than the forecast interval duration of 3600 seconds (60 minutes). Defaults to 300 seconds if not specified.
        public let schedulingBufferTime: Int?

        @inlinable
        public init(maxCapacityBreachBehavior: PredictiveScalingMaxCapacityBreachBehavior? = nil, maxCapacityBuffer: Int? = nil, metricSpecifications: [PredictiveScalingMetricSpecification], mode: PredictiveScalingMode? = nil, schedulingBufferTime: Int? = nil) {
            self.maxCapacityBreachBehavior = maxCapacityBreachBehavior
            self.maxCapacityBuffer = maxCapacityBuffer
            self.metricSpecifications = metricSpecifications
            self.mode = mode
            self.schedulingBufferTime = schedulingBufferTime
        }

        public func validate(name: String) throws {
            try self.validate(self.maxCapacityBuffer, name: "maxCapacityBuffer", parent: name, max: 100)
            try self.validate(self.maxCapacityBuffer, name: "maxCapacityBuffer", parent: name, min: 0)
            try self.metricSpecifications.forEach {
                try $0.validate(name: "\(name).metricSpecifications[]")
            }
            try self.validate(self.schedulingBufferTime, name: "schedulingBufferTime", parent: name, max: 3600)
            try self.validate(self.schedulingBufferTime, name: "schedulingBufferTime", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case maxCapacityBreachBehavior = "MaxCapacityBreachBehavior"
            case maxCapacityBuffer = "MaxCapacityBuffer"
            case metricSpecifications = "MetricSpecifications"
            case mode = "Mode"
            case schedulingBufferTime = "SchedulingBufferTime"
        }
    }

    public struct PredictiveScalingPredefinedLoadMetricSpecification: AWSEncodableShape & AWSDecodableShape {
        ///  The metric type.
        public let predefinedMetricType: String
        ///  A label that uniquely identifies a target group.
        public let resourceLabel: String?

        @inlinable
        public init(predefinedMetricType: String, resourceLabel: String? = nil) {
            self.predefinedMetricType = predefinedMetricType
            self.resourceLabel = resourceLabel
        }

        public func validate(name: String) throws {
            try self.validate(self.predefinedMetricType, name: "predefinedMetricType", parent: name, max: 128)
            try self.validate(self.predefinedMetricType, name: "predefinedMetricType", parent: name, min: 1)
            try self.validate(self.resourceLabel, name: "resourceLabel", parent: name, max: 1023)
            try self.validate(self.resourceLabel, name: "resourceLabel", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case predefinedMetricType = "PredefinedMetricType"
            case resourceLabel = "ResourceLabel"
        }
    }

    public struct PredictiveScalingPredefinedMetricPairSpecification: AWSEncodableShape & AWSDecodableShape {
        ///  Indicates which metrics to use. There are two different types of metrics for each metric type: one is a load metric and one is a scaling metric.
        public let predefinedMetricType: String
        ///  A label that uniquely identifies a specific target group from which to determine the total and average request count.
        public let resourceLabel: String?

        @inlinable
        public init(predefinedMetricType: String, resourceLabel: String? = nil) {
            self.predefinedMetricType = predefinedMetricType
            self.resourceLabel = resourceLabel
        }

        public func validate(name: String) throws {
            try self.validate(self.predefinedMetricType, name: "predefinedMetricType", parent: name, max: 128)
            try self.validate(self.predefinedMetricType, name: "predefinedMetricType", parent: name, min: 1)
            try self.validate(self.resourceLabel, name: "resourceLabel", parent: name, max: 1023)
            try self.validate(self.resourceLabel, name: "resourceLabel", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case predefinedMetricType = "PredefinedMetricType"
            case resourceLabel = "ResourceLabel"
        }
    }

    public struct PredictiveScalingPredefinedScalingMetricSpecification: AWSEncodableShape & AWSDecodableShape {
        ///  The metric type.
        public let predefinedMetricType: String
        ///  A label that uniquely identifies a specific target group from which to determine the average request count.
        public let resourceLabel: String?

        @inlinable
        public init(predefinedMetricType: String, resourceLabel: String? = nil) {
            self.predefinedMetricType = predefinedMetricType
            self.resourceLabel = resourceLabel
        }

        public func validate(name: String) throws {
            try self.validate(self.predefinedMetricType, name: "predefinedMetricType", parent: name, max: 128)
            try self.validate(self.predefinedMetricType, name: "predefinedMetricType", parent: name, min: 1)
            try self.validate(self.resourceLabel, name: "resourceLabel", parent: name, max: 1023)
            try self.validate(self.resourceLabel, name: "resourceLabel", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case predefinedMetricType = "PredefinedMetricType"
            case resourceLabel = "ResourceLabel"
        }
    }

    public struct PutScalingPolicyRequest: AWSEncodableShape {
        /// The name of the scaling policy. You cannot change the name of a scaling policy, but you can delete the original scaling policy and create a new scaling policy with the same settings and a different name.
        public let policyName: String
        /// The scaling policy type. This parameter is required if you are creating a scaling policy. The following policy types are supported:   TargetTrackingScaling—Not supported for Amazon EMR.  StepScaling—Not supported for DynamoDB, Amazon Comprehend, Lambda, Amazon Keyspaces, Amazon MSK, Amazon ElastiCache, or Neptune.  PredictiveScaling—Only supported for Amazon ECS. For more information, see Target tracking scaling policies, Step scaling policies, and Predictive scaling policies  in the Application Auto Scaling User Guide.
        public let policyType: PolicyType?
        ///  The configuration of the predictive scaling policy.
        public let predictiveScalingPolicyConfiguration: PredictiveScalingPolicyConfiguration?
        /// The identifier of the resource associated with the scaling policy. This string consists of the resource type and unique identifier.   ECS service - The resource type is service and the unique identifier is the cluster name   and service name. Example: service/my-cluster/my-service.   Spot Fleet - The resource type is spot-fleet-request and the unique identifier is the  Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.   EMR cluster - The resource type is instancegroup and the unique identifier is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.   AppStream 2.0 fleet - The resource type is fleet and the unique identifier is the fleet name. Example: fleet/sample-fleet.   DynamoDB table - The resource type is table and the unique identifier is the table name.  Example: table/my-table.   DynamoDB global secondary index - The resource type is index and the unique identifier is the index name.  Example: table/my-table/index/my-table-index.   Aurora DB cluster - The resource type is cluster and the unique identifier is the cluster name. Example: cluster:my-db-cluster.   SageMaker endpoint variant - The resource type is variant and the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.   Custom resources are not supported with a resource type. This parameter must specify the OutputValue from the CloudFormation template stack used to access the resources. The unique identifier is defined by the service provider. More information is available in our GitHub repository.   Amazon Comprehend document classification endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us-west-2:123456789012:document-classifier-endpoint/EXAMPLE.   Amazon Comprehend entity recognizer endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us-west-2:123456789012:entity-recognizer-endpoint/EXAMPLE.   Lambda provisioned concurrency - The resource type is function and the unique identifier is the function name with a function version or alias name suffix that is not $LATEST.  Example: function:my-function:prod or function:my-function:1.   Amazon Keyspaces table - The resource type is table and the unique identifier is the table name.  Example: keyspace/mykeyspace/table/mytable.   Amazon MSK cluster - The resource type and unique identifier are specified using the cluster ARN.  Example: arn:aws:kafka:us-east-1:123456789012:cluster/demo-cluster-1/6357e0b2-0e6a-4b86-a0b4-70df934c2e31-5.   Amazon ElastiCache replication group - The resource type is replication-group and the unique identifier is the replication group name. Example: replication-group/mycluster.   Amazon ElastiCache cache cluster - The resource type is cache-cluster and the unique identifier is the cache cluster name. Example: cache-cluster/mycluster.   Neptune cluster - The resource type is cluster and the unique identifier is the cluster name. Example: cluster:mycluster.   SageMaker serverless endpoint - The resource type is variant and the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.   SageMaker inference component - The resource type is inference-component and the unique identifier is the resource ID. Example: inference-component/my-inference-component.   Pool of WorkSpaces - The resource type is workspacespool and the unique identifier is the pool ID.  Example: workspacespool/wspool-123456.
        public let resourceId: String
        /// The scalable dimension. This string consists of the service namespace, resource type, and scaling property.    ecs:service:DesiredCount - The task count of an ECS service.    elasticmapreduce:instancegroup:InstanceCount - The instance count of an EMR Instance Group.    ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot Fleet.    appstream:fleet:DesiredCapacity - The capacity of an AppStream 2.0 fleet.    dynamodb:table:ReadCapacityUnits - The provisioned read capacity for a DynamoDB table.    dynamodb:table:WriteCapacityUnits - The provisioned write capacity for a DynamoDB table.    dynamodb:index:ReadCapacityUnits - The provisioned read capacity for a DynamoDB global secondary index.    dynamodb:index:WriteCapacityUnits - The provisioned write capacity for a DynamoDB global secondary index.    rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora DB cluster. Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible edition.    sagemaker:variant:DesiredInstanceCount - The number of EC2 instances for a SageMaker model endpoint variant.    custom-resource:ResourceType:Property - The scalable dimension for a custom resource provided by your own application or service.    comprehend:document-classifier-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend document classification endpoint.    comprehend:entity-recognizer-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend entity recognizer endpoint.    lambda:function:ProvisionedConcurrency - The provisioned concurrency for a Lambda function.    cassandra:table:ReadCapacityUnits - The provisioned read capacity for an Amazon Keyspaces table.    cassandra:table:WriteCapacityUnits - The provisioned write capacity for an Amazon Keyspaces table.    kafka:broker-storage:VolumeSize - The provisioned volume size (in GiB) for brokers in an Amazon MSK cluster.    elasticache:cache-cluster:Nodes - The number of nodes for an Amazon ElastiCache cache cluster.    elasticache:replication-group:NodeGroups - The number of node groups for an Amazon ElastiCache replication group.    elasticache:replication-group:Replicas - The number of replicas per node group for an Amazon ElastiCache replication group.    neptune:cluster:ReadReplicaCount - The count of read replicas in an Amazon Neptune DB cluster.    sagemaker:variant:DesiredProvisionedConcurrency - The provisioned concurrency for a SageMaker serverless endpoint.    sagemaker:inference-component:DesiredCopyCount - The number of copies across an endpoint for a SageMaker inference component.    workspaces:workspacespool:DesiredUserSessions - The number of user sessions for the WorkSpaces in the pool.
        public let scalableDimension: ScalableDimension
        /// The namespace of the Amazon Web Services service that provides the resource. For a resource provided by your own application or service, use custom-resource instead.
        public let serviceNamespace: ServiceNamespace
        /// A step scaling policy. This parameter is required if you are creating a policy and the policy type is StepScaling.
        public let stepScalingPolicyConfiguration: StepScalingPolicyConfiguration?
        /// A target tracking scaling policy. Includes support for predefined or customized metrics. This parameter is required if you are creating a policy and the policy type is TargetTrackingScaling.
        public let targetTrackingScalingPolicyConfiguration: TargetTrackingScalingPolicyConfiguration?

        @inlinable
        public init(policyName: String, policyType: PolicyType? = nil, predictiveScalingPolicyConfiguration: PredictiveScalingPolicyConfiguration? = nil, resourceId: String, scalableDimension: ScalableDimension, serviceNamespace: ServiceNamespace, stepScalingPolicyConfiguration: StepScalingPolicyConfiguration? = nil, targetTrackingScalingPolicyConfiguration: TargetTrackingScalingPolicyConfiguration? = nil) {
            self.policyName = policyName
            self.policyType = policyType
            self.predictiveScalingPolicyConfiguration = predictiveScalingPolicyConfiguration
            self.resourceId = resourceId
            self.scalableDimension = scalableDimension
            self.serviceNamespace = serviceNamespace
            self.stepScalingPolicyConfiguration = stepScalingPolicyConfiguration
            self.targetTrackingScalingPolicyConfiguration = targetTrackingScalingPolicyConfiguration
        }

        public func validate(name: String) throws {
            try self.validate(self.policyName, name: "policyName", parent: name, max: 256)
            try self.validate(self.policyName, name: "policyName", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "^\\p{Print}+$")
            try self.predictiveScalingPolicyConfiguration?.validate(name: "\(name).predictiveScalingPolicyConfiguration")
            try self.validate(self.resourceId, name: "resourceId", parent: name, max: 1600)
            try self.validate(self.resourceId, name: "resourceId", parent: name, min: 1)
            try self.validate(self.resourceId, name: "resourceId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.targetTrackingScalingPolicyConfiguration?.validate(name: "\(name).targetTrackingScalingPolicyConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case policyName = "PolicyName"
            case policyType = "PolicyType"
            case predictiveScalingPolicyConfiguration = "PredictiveScalingPolicyConfiguration"
            case resourceId = "ResourceId"
            case scalableDimension = "ScalableDimension"
            case serviceNamespace = "ServiceNamespace"
            case stepScalingPolicyConfiguration = "StepScalingPolicyConfiguration"
            case targetTrackingScalingPolicyConfiguration = "TargetTrackingScalingPolicyConfiguration"
        }
    }

    public struct PutScalingPolicyResponse: AWSDecodableShape {
        /// The CloudWatch alarms created for the target tracking scaling policy.
        public let alarms: [Alarm]?
        /// The Amazon Resource Name (ARN) of the resulting scaling policy.
        public let policyARN: String

        @inlinable
        public init(alarms: [Alarm]? = nil, policyARN: String) {
            self.alarms = alarms
            self.policyARN = policyARN
        }

        private enum CodingKeys: String, CodingKey {
            case alarms = "Alarms"
            case policyARN = "PolicyARN"
        }
    }

    public struct PutScheduledActionRequest: AWSEncodableShape {
        /// The date and time for the recurring schedule to end, in UTC.
        public let endTime: Date?
        /// The identifier of the resource associated with the scheduled action. This string consists of the resource type and unique identifier.   ECS service - The resource type is service and the unique identifier is the cluster name   and service name. Example: service/my-cluster/my-service.   Spot Fleet - The resource type is spot-fleet-request and the unique identifier is the  Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.   EMR cluster - The resource type is instancegroup and the unique identifier is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.   AppStream 2.0 fleet - The resource type is fleet and the unique identifier is the fleet name. Example: fleet/sample-fleet.   DynamoDB table - The resource type is table and the unique identifier is the table name.  Example: table/my-table.   DynamoDB global secondary index - The resource type is index and the unique identifier is the index name.  Example: table/my-table/index/my-table-index.   Aurora DB cluster - The resource type is cluster and the unique identifier is the cluster name. Example: cluster:my-db-cluster.   SageMaker endpoint variant - The resource type is variant and the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.   Custom resources are not supported with a resource type. This parameter must specify the OutputValue from the CloudFormation template stack used to access the resources. The unique identifier is defined by the service provider. More information is available in our GitHub repository.   Amazon Comprehend document classification endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us-west-2:123456789012:document-classifier-endpoint/EXAMPLE.   Amazon Comprehend entity recognizer endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us-west-2:123456789012:entity-recognizer-endpoint/EXAMPLE.   Lambda provisioned concurrency - The resource type is function and the unique identifier is the function name with a function version or alias name suffix that is not $LATEST.  Example: function:my-function:prod or function:my-function:1.   Amazon Keyspaces table - The resource type is table and the unique identifier is the table name.  Example: keyspace/mykeyspace/table/mytable.   Amazon MSK cluster - The resource type and unique identifier are specified using the cluster ARN.  Example: arn:aws:kafka:us-east-1:123456789012:cluster/demo-cluster-1/6357e0b2-0e6a-4b86-a0b4-70df934c2e31-5.   Amazon ElastiCache replication group - The resource type is replication-group and the unique identifier is the replication group name. Example: replication-group/mycluster.   Amazon ElastiCache cache cluster - The resource type is cache-cluster and the unique identifier is the cache cluster name. Example: cache-cluster/mycluster.   Neptune cluster - The resource type is cluster and the unique identifier is the cluster name. Example: cluster:mycluster.   SageMaker serverless endpoint - The resource type is variant and the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.   SageMaker inference component - The resource type is inference-component and the unique identifier is the resource ID. Example: inference-component/my-inference-component.   Pool of WorkSpaces - The resource type is workspacespool and the unique identifier is the pool ID.  Example: workspacespool/wspool-123456.
        public let resourceId: String
        /// The scalable dimension. This string consists of the service namespace, resource type, and scaling property.    ecs:service:DesiredCount - The task count of an ECS service.    elasticmapreduce:instancegroup:InstanceCount - The instance count of an EMR Instance Group.    ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot Fleet.    appstream:fleet:DesiredCapacity - The capacity of an AppStream 2.0 fleet.    dynamodb:table:ReadCapacityUnits - The provisioned read capacity for a DynamoDB table.    dynamodb:table:WriteCapacityUnits - The provisioned write capacity for a DynamoDB table.    dynamodb:index:ReadCapacityUnits - The provisioned read capacity for a DynamoDB global secondary index.    dynamodb:index:WriteCapacityUnits - The provisioned write capacity for a DynamoDB global secondary index.    rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora DB cluster. Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible edition.    sagemaker:variant:DesiredInstanceCount - The number of EC2 instances for a SageMaker model endpoint variant.    custom-resource:ResourceType:Property - The scalable dimension for a custom resource provided by your own application or service.    comprehend:document-classifier-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend document classification endpoint.    comprehend:entity-recognizer-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend entity recognizer endpoint.    lambda:function:ProvisionedConcurrency - The provisioned concurrency for a Lambda function.    cassandra:table:ReadCapacityUnits - The provisioned read capacity for an Amazon Keyspaces table.    cassandra:table:WriteCapacityUnits - The provisioned write capacity for an Amazon Keyspaces table.    kafka:broker-storage:VolumeSize - The provisioned volume size (in GiB) for brokers in an Amazon MSK cluster.    elasticache:cache-cluster:Nodes - The number of nodes for an Amazon ElastiCache cache cluster.    elasticache:replication-group:NodeGroups - The number of node groups for an Amazon ElastiCache replication group.    elasticache:replication-group:Replicas - The number of replicas per node group for an Amazon ElastiCache replication group.    neptune:cluster:ReadReplicaCount - The count of read replicas in an Amazon Neptune DB cluster.    sagemaker:variant:DesiredProvisionedConcurrency - The provisioned concurrency for a SageMaker serverless endpoint.    sagemaker:inference-component:DesiredCopyCount - The number of copies across an endpoint for a SageMaker inference component.    workspaces:workspacespool:DesiredUserSessions - The number of user sessions for the WorkSpaces in the pool.
        public let scalableDimension: ScalableDimension
        /// The new minimum and maximum capacity. You can set both values or just one. At the scheduled time, if the current capacity is below the minimum capacity, Application Auto Scaling scales out to the minimum capacity. If the current capacity is above the maximum capacity, Application Auto Scaling scales in to the maximum capacity.
        public let scalableTargetAction: ScalableTargetAction?
        /// The schedule for this action. The following formats are supported:   At expressions - "at(yyyy-mm-ddThh:mm:ss)"   Rate expressions - "rate(value unit)"   Cron expressions - "cron(fields)"   At expressions are useful for one-time schedules. Cron expressions are useful for  scheduled actions that run periodically at a specified date and time, and rate expressions  are useful for scheduled actions that run at a regular interval. At and cron expressions use Universal Coordinated Time (UTC) by default. The cron format consists of six fields separated by white spaces: [Minutes] [Hours] [Day_of_Month] [Month] [Day_of_Week] [Year]. For rate expressions, value is a positive integer and unit is  minute | minutes | hour | hours | day | days. For more information, see Schedule recurring scaling actions using cron expressions in the Application Auto Scaling User Guide.
        public let schedule: String?
        /// The name of the scheduled action. This name must be unique among all other scheduled actions on the specified scalable target.
        public let scheduledActionName: String
        /// The namespace of the Amazon Web Services service that provides the resource. For a resource provided by your own application or service, use custom-resource instead.
        public let serviceNamespace: ServiceNamespace
        /// The date and time for this scheduled action to start, in UTC.
        public let startTime: Date?
        /// Specifies the time zone used when setting a scheduled action by using an at or cron expression. If a time zone is not provided, UTC is used by default. Valid values are the canonical names of the IANA time zones supported by Joda-Time (such as Etc/GMT+9 or Pacific/Tahiti). For more information, see https://www.joda.org/joda-time/timezones.html.
        public let timezone: String?

        @inlinable
        public init(endTime: Date? = nil, resourceId: String, scalableDimension: ScalableDimension, scalableTargetAction: ScalableTargetAction? = nil, schedule: String? = nil, scheduledActionName: String, serviceNamespace: ServiceNamespace, startTime: Date? = nil, timezone: String? = nil) {
            self.endTime = endTime
            self.resourceId = resourceId
            self.scalableDimension = scalableDimension
            self.scalableTargetAction = scalableTargetAction
            self.schedule = schedule
            self.scheduledActionName = scheduledActionName
            self.serviceNamespace = serviceNamespace
            self.startTime = startTime
            self.timezone = timezone
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceId, name: "resourceId", parent: name, max: 1600)
            try self.validate(self.resourceId, name: "resourceId", parent: name, min: 1)
            try self.validate(self.resourceId, name: "resourceId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.schedule, name: "schedule", parent: name, max: 1600)
            try self.validate(self.schedule, name: "schedule", parent: name, min: 1)
            try self.validate(self.schedule, name: "schedule", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.scheduledActionName, name: "scheduledActionName", parent: name, max: 256)
            try self.validate(self.scheduledActionName, name: "scheduledActionName", parent: name, min: 1)
            try self.validate(self.scheduledActionName, name: "scheduledActionName", parent: name, pattern: "^(?!((^[ ]+.*)|(.*([\\u0000-\\u001f]|[\\u007f-\\u009f]|[:/|])+.*)|(.*[ ]+$))).+$")
            try self.validate(self.timezone, name: "timezone", parent: name, max: 1600)
            try self.validate(self.timezone, name: "timezone", parent: name, min: 1)
            try self.validate(self.timezone, name: "timezone", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case endTime = "EndTime"
            case resourceId = "ResourceId"
            case scalableDimension = "ScalableDimension"
            case scalableTargetAction = "ScalableTargetAction"
            case schedule = "Schedule"
            case scheduledActionName = "ScheduledActionName"
            case serviceNamespace = "ServiceNamespace"
            case startTime = "StartTime"
            case timezone = "Timezone"
        }
    }

    public struct PutScheduledActionResponse: AWSDecodableShape {
        public init() {}
    }

    public struct RegisterScalableTargetRequest: AWSEncodableShape {
        /// The maximum value that you plan to scale out to. When a scaling policy is in effect, Application Auto Scaling can scale out (expand) as needed to the maximum capacity limit in response to changing demand. This property is required when registering a new scalable target. Although you can specify a large maximum capacity, note that service quotas might impose lower limits. Each service has its own default quotas for the maximum capacity of the resource. If you want to specify a higher limit, you can request an increase. For more information, consult the documentation for that service. For information about the default quotas for each service, see Service endpoints and quotas in the Amazon Web Services General Reference.
        public let maxCapacity: Int?
        /// The minimum value that you plan to scale in to. When a scaling policy is in effect, Application Auto Scaling can scale in (contract) as needed to the minimum capacity limit in response to changing demand. This property is required when registering a new scalable target. For the following resources, the minimum value allowed is 0.   AppStream 2.0 fleets   Aurora DB clusters   ECS services   EMR clusters   Lambda provisioned concurrency   SageMaker endpoint variants   SageMaker inference components   SageMaker serverless endpoint provisioned concurrency   Spot Fleets   custom resources   It's strongly recommended that you specify a value greater than 0. A value greater than 0 means that data points are continuously reported to CloudWatch that scaling policies can use to scale on a metric like average CPU utilization. For all other resources, the minimum allowed value depends on the type of resource that you are using. If you provide a value that is lower than what a resource can accept, an error occurs. In which case, the error message will provide the minimum value that the resource can accept.
        public let minCapacity: Int?
        /// The identifier of the resource that is associated with the scalable target. This string consists of the resource type and unique identifier.   ECS service - The resource type is service and the unique identifier is the cluster name   and service name. Example: service/my-cluster/my-service.   Spot Fleet - The resource type is spot-fleet-request and the unique identifier is the  Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.   EMR cluster - The resource type is instancegroup and the unique identifier is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.   AppStream 2.0 fleet - The resource type is fleet and the unique identifier is the fleet name. Example: fleet/sample-fleet.   DynamoDB table - The resource type is table and the unique identifier is the table name.  Example: table/my-table.   DynamoDB global secondary index - The resource type is index and the unique identifier is the index name.  Example: table/my-table/index/my-table-index.   Aurora DB cluster - The resource type is cluster and the unique identifier is the cluster name. Example: cluster:my-db-cluster.   SageMaker endpoint variant - The resource type is variant and the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.   Custom resources are not supported with a resource type. This parameter must specify the OutputValue from the CloudFormation template stack used to access the resources. The unique identifier is defined by the service provider. More information is available in our GitHub repository.   Amazon Comprehend document classification endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us-west-2:123456789012:document-classifier-endpoint/EXAMPLE.   Amazon Comprehend entity recognizer endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us-west-2:123456789012:entity-recognizer-endpoint/EXAMPLE.   Lambda provisioned concurrency - The resource type is function and the unique identifier is the function name with a function version or alias name suffix that is not $LATEST.  Example: function:my-function:prod or function:my-function:1.   Amazon Keyspaces table - The resource type is table and the unique identifier is the table name.  Example: keyspace/mykeyspace/table/mytable.   Amazon MSK cluster - The resource type and unique identifier are specified using the cluster ARN.  Example: arn:aws:kafka:us-east-1:123456789012:cluster/demo-cluster-1/6357e0b2-0e6a-4b86-a0b4-70df934c2e31-5.   Amazon ElastiCache replication group - The resource type is replication-group and the unique identifier is the replication group name. Example: replication-group/mycluster.   Amazon ElastiCache cache cluster - The resource type is cache-cluster and the unique identifier is the cache cluster name. Example: cache-cluster/mycluster.   Neptune cluster - The resource type is cluster and the unique identifier is the cluster name. Example: cluster:mycluster.   SageMaker serverless endpoint - The resource type is variant and the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.   SageMaker inference component - The resource type is inference-component and the unique identifier is the resource ID. Example: inference-component/my-inference-component.   Pool of WorkSpaces - The resource type is workspacespool and the unique identifier is the pool ID.  Example: workspacespool/wspool-123456.
        public let resourceId: String
        /// This parameter is required for services that do not support service-linked roles (such as Amazon EMR), and it must specify the ARN of an IAM role that allows Application Auto Scaling to modify the scalable target on your behalf.  If the service supports service-linked roles, Application Auto Scaling uses a service-linked role, which it creates if it does not yet exist. For more information, see How Application Auto Scaling works with IAM.
        public let roleARN: String?
        /// The scalable dimension associated with the scalable target. This string consists of the service namespace, resource type, and scaling property.    ecs:service:DesiredCount - The task count of an ECS service.    elasticmapreduce:instancegroup:InstanceCount - The instance count of an EMR Instance Group.    ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot Fleet.    appstream:fleet:DesiredCapacity - The capacity of an AppStream 2.0 fleet.    dynamodb:table:ReadCapacityUnits - The provisioned read capacity for a DynamoDB table.    dynamodb:table:WriteCapacityUnits - The provisioned write capacity for a DynamoDB table.    dynamodb:index:ReadCapacityUnits - The provisioned read capacity for a DynamoDB global secondary index.    dynamodb:index:WriteCapacityUnits - The provisioned write capacity for a DynamoDB global secondary index.    rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora DB cluster. Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible edition.    sagemaker:variant:DesiredInstanceCount - The number of EC2 instances for a SageMaker model endpoint variant.    custom-resource:ResourceType:Property - The scalable dimension for a custom resource provided by your own application or service.    comprehend:document-classifier-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend document classification endpoint.    comprehend:entity-recognizer-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend entity recognizer endpoint.    lambda:function:ProvisionedConcurrency - The provisioned concurrency for a Lambda function.    cassandra:table:ReadCapacityUnits - The provisioned read capacity for an Amazon Keyspaces table.    cassandra:table:WriteCapacityUnits - The provisioned write capacity for an Amazon Keyspaces table.    kafka:broker-storage:VolumeSize - The provisioned volume size (in GiB) for brokers in an Amazon MSK cluster.    elasticache:cache-cluster:Nodes - The number of nodes for an Amazon ElastiCache cache cluster.    elasticache:replication-group:NodeGroups - The number of node groups for an Amazon ElastiCache replication group.    elasticache:replication-group:Replicas - The number of replicas per node group for an Amazon ElastiCache replication group.    neptune:cluster:ReadReplicaCount - The count of read replicas in an Amazon Neptune DB cluster.    sagemaker:variant:DesiredProvisionedConcurrency - The provisioned concurrency for a SageMaker serverless endpoint.    sagemaker:inference-component:DesiredCopyCount - The number of copies across an endpoint for a SageMaker inference component.    workspaces:workspacespool:DesiredUserSessions - The number of user sessions for the WorkSpaces in the pool.
        public let scalableDimension: ScalableDimension
        /// The namespace of the Amazon Web Services service that provides the resource. For a resource provided by your own application or service, use custom-resource instead.
        public let serviceNamespace: ServiceNamespace
        /// An embedded object that contains attributes and attribute values that are used to suspend and resume automatic scaling. Setting the value of an attribute to true suspends the specified scaling activities. Setting it to false (default) resumes the specified scaling activities.   Suspension Outcomes    For DynamicScalingInSuspended, while a suspension is in effect, all scale-in activities that are triggered by a scaling policy are suspended.   For DynamicScalingOutSuspended, while a suspension is in effect, all scale-out activities that are triggered by a scaling policy are suspended.   For ScheduledScalingSuspended, while a suspension is in effect, all scaling activities that involve scheduled actions are suspended.    For more information, see Suspend and resume scaling in the Application Auto Scaling User Guide.
        public let suspendedState: SuspendedState?
        /// Assigns one or more tags to the scalable target. Use this parameter to tag the scalable target when it is created. To tag an existing scalable target, use the TagResource operation. Each tag consists of a tag key and a tag value. Both the tag key and the tag value are required. You cannot have more than one tag on a scalable target with the same tag key. Use tags to control access to a scalable target. For more information, see Tagging support for Application Auto Scaling in the Application Auto Scaling User Guide.
        public let tags: [String: String]?

        @inlinable
        public init(maxCapacity: Int? = nil, minCapacity: Int? = nil, resourceId: String, roleARN: String? = nil, scalableDimension: ScalableDimension, serviceNamespace: ServiceNamespace, suspendedState: SuspendedState? = nil, tags: [String: String]? = nil) {
            self.maxCapacity = maxCapacity
            self.minCapacity = minCapacity
            self.resourceId = resourceId
            self.roleARN = roleARN
            self.scalableDimension = scalableDimension
            self.serviceNamespace = serviceNamespace
            self.suspendedState = suspendedState
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceId, name: "resourceId", parent: name, max: 1600)
            try self.validate(self.resourceId, name: "resourceId", parent: name, min: 1)
            try self.validate(self.resourceId, name: "resourceId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.roleARN, name: "roleARN", parent: name, max: 1600)
            try self.validate(self.roleARN, name: "roleARN", parent: name, min: 1)
            try self.validate(self.roleARN, name: "roleARN", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case maxCapacity = "MaxCapacity"
            case minCapacity = "MinCapacity"
            case resourceId = "ResourceId"
            case roleARN = "RoleARN"
            case scalableDimension = "ScalableDimension"
            case serviceNamespace = "ServiceNamespace"
            case suspendedState = "SuspendedState"
            case tags = "Tags"
        }
    }

    public struct RegisterScalableTargetResponse: AWSDecodableShape {
        /// The ARN of the scalable target.
        public let scalableTargetARN: String?

        @inlinable
        public init(scalableTargetARN: String? = nil) {
            self.scalableTargetARN = scalableTargetARN
        }

        private enum CodingKeys: String, CodingKey {
            case scalableTargetARN = "ScalableTargetARN"
        }
    }

    public struct ResourceNotFoundException: AWSErrorShape {
        public let message: String?
        /// The name of the Application Auto Scaling resource. This value is an Amazon Resource Name (ARN).
        public let resourceName: String?

        @inlinable
        public init(message: String? = nil, resourceName: String? = nil) {
            self.message = message
            self.resourceName = resourceName
        }

        private enum CodingKeys: String, CodingKey {
            case message = "Message"
            case resourceName = "ResourceName"
        }
    }

    public struct ScalableTarget: AWSDecodableShape {
        /// The Unix timestamp for when the scalable target was created.
        public let creationTime: Date
        /// The maximum value to scale to in response to a scale-out activity.
        public let maxCapacity: Int
        /// The minimum value to scale to in response to a scale-in activity.
        public let minCapacity: Int
        ///  The predicted capacity of the scalable target.
        public let predictedCapacity: Int?
        /// The identifier of the resource associated with the scalable target. This string consists of the resource type and unique identifier.   ECS service - The resource type is service and the unique identifier is the cluster name   and service name. Example: service/my-cluster/my-service.   Spot Fleet - The resource type is spot-fleet-request and the unique identifier is the  Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.   EMR cluster - The resource type is instancegroup and the unique identifier is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.   AppStream 2.0 fleet - The resource type is fleet and the unique identifier is the fleet name. Example: fleet/sample-fleet.   DynamoDB table - The resource type is table and the unique identifier is the table name.  Example: table/my-table.   DynamoDB global secondary index - The resource type is index and the unique identifier is the index name.  Example: table/my-table/index/my-table-index.   Aurora DB cluster - The resource type is cluster and the unique identifier is the cluster name. Example: cluster:my-db-cluster.   SageMaker endpoint variant - The resource type is variant and the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.   Custom resources are not supported with a resource type. This parameter must specify the OutputValue from the CloudFormation template stack used to access the resources. The unique identifier is defined by the service provider. More information is available in our GitHub repository.   Amazon Comprehend document classification endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us-west-2:123456789012:document-classifier-endpoint/EXAMPLE.   Amazon Comprehend entity recognizer endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us-west-2:123456789012:entity-recognizer-endpoint/EXAMPLE.   Lambda provisioned concurrency - The resource type is function and the unique identifier is the function name with a function version or alias name suffix that is not $LATEST.  Example: function:my-function:prod or function:my-function:1.   Amazon Keyspaces table - The resource type is table and the unique identifier is the table name.  Example: keyspace/mykeyspace/table/mytable.   Amazon MSK cluster - The resource type and unique identifier are specified using the cluster ARN.  Example: arn:aws:kafka:us-east-1:123456789012:cluster/demo-cluster-1/6357e0b2-0e6a-4b86-a0b4-70df934c2e31-5.   Amazon ElastiCache replication group - The resource type is replication-group and the unique identifier is the replication group name. Example: replication-group/mycluster.   Amazon ElastiCache cache cluster - The resource type is cache-cluster and the unique identifier is the cache cluster name. Example: cache-cluster/mycluster.   Neptune cluster - The resource type is cluster and the unique identifier is the cluster name. Example: cluster:mycluster.   SageMaker serverless endpoint - The resource type is variant and the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.   SageMaker inference component - The resource type is inference-component and the unique identifier is the resource ID. Example: inference-component/my-inference-component.   Pool of WorkSpaces - The resource type is workspacespool and the unique identifier is the pool ID.  Example: workspacespool/wspool-123456.
        public let resourceId: String
        /// The ARN of an IAM role that allows Application Auto Scaling to modify the scalable target on your behalf.
        public let roleARN: String
        /// The scalable dimension associated with the scalable target. This string consists of the service namespace, resource type, and scaling property.    ecs:service:DesiredCount - The task count of an ECS service.    elasticmapreduce:instancegroup:InstanceCount - The instance count of an EMR Instance Group.    ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot Fleet.    appstream:fleet:DesiredCapacity - The capacity of an AppStream 2.0 fleet.    dynamodb:table:ReadCapacityUnits - The provisioned read capacity for a DynamoDB table.    dynamodb:table:WriteCapacityUnits - The provisioned write capacity for a DynamoDB table.    dynamodb:index:ReadCapacityUnits - The provisioned read capacity for a DynamoDB global secondary index.    dynamodb:index:WriteCapacityUnits - The provisioned write capacity for a DynamoDB global secondary index.    rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora DB cluster. Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible edition.    sagemaker:variant:DesiredInstanceCount - The number of EC2 instances for a SageMaker model endpoint variant.    custom-resource:ResourceType:Property - The scalable dimension for a custom resource provided by your own application or service.    comprehend:document-classifier-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend document classification endpoint.    comprehend:entity-recognizer-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend entity recognizer endpoint.    lambda:function:ProvisionedConcurrency - The provisioned concurrency for a Lambda function.    cassandra:table:ReadCapacityUnits - The provisioned read capacity for an Amazon Keyspaces table.    cassandra:table:WriteCapacityUnits - The provisioned write capacity for an Amazon Keyspaces table.    kafka:broker-storage:VolumeSize - The provisioned volume size (in GiB) for brokers in an Amazon MSK cluster.    elasticache:cache-cluster:Nodes - The number of nodes for an Amazon ElastiCache cache cluster.    elasticache:replication-group:NodeGroups - The number of node groups for an Amazon ElastiCache replication group.    elasticache:replication-group:Replicas - The number of replicas per node group for an Amazon ElastiCache replication group.    neptune:cluster:ReadReplicaCount - The count of read replicas in an Amazon Neptune DB cluster.    sagemaker:variant:DesiredProvisionedConcurrency - The provisioned concurrency for a SageMaker serverless endpoint.    sagemaker:inference-component:DesiredCopyCount - The number of copies across an endpoint for a SageMaker inference component.    workspaces:workspacespool:DesiredUserSessions - The number of user sessions for the WorkSpaces in the pool.
        public let scalableDimension: ScalableDimension
        /// The ARN of the scalable target.
        public let scalableTargetARN: String?
        /// The namespace of the Amazon Web Services service that provides the resource, or a custom-resource.
        public let serviceNamespace: ServiceNamespace
        /// Specifies whether the scaling activities for a scalable target are in a suspended state.
        public let suspendedState: SuspendedState?

        @inlinable
        public init(creationTime: Date, maxCapacity: Int, minCapacity: Int, predictedCapacity: Int? = nil, resourceId: String, roleARN: String, scalableDimension: ScalableDimension, scalableTargetARN: String? = nil, serviceNamespace: ServiceNamespace, suspendedState: SuspendedState? = nil) {
            self.creationTime = creationTime
            self.maxCapacity = maxCapacity
            self.minCapacity = minCapacity
            self.predictedCapacity = predictedCapacity
            self.resourceId = resourceId
            self.roleARN = roleARN
            self.scalableDimension = scalableDimension
            self.scalableTargetARN = scalableTargetARN
            self.serviceNamespace = serviceNamespace
            self.suspendedState = suspendedState
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime = "CreationTime"
            case maxCapacity = "MaxCapacity"
            case minCapacity = "MinCapacity"
            case predictedCapacity = "PredictedCapacity"
            case resourceId = "ResourceId"
            case roleARN = "RoleARN"
            case scalableDimension = "ScalableDimension"
            case scalableTargetARN = "ScalableTargetARN"
            case serviceNamespace = "ServiceNamespace"
            case suspendedState = "SuspendedState"
        }
    }

    public struct ScalableTargetAction: AWSEncodableShape & AWSDecodableShape {
        /// The maximum capacity. Although you can specify a large maximum capacity, note that service quotas may impose lower limits. Each service has its own default quotas for the maximum capacity of the resource. If you want to specify a higher limit, you can request an increase. For more information, consult the documentation for that service. For information about the default quotas for each service, see Service endpoints and quotas in the Amazon Web Services General Reference.
        public let maxCapacity: Int?
        /// The minimum capacity. When the scheduled action runs, the resource will have at least this much capacity, but it might have more depending on other settings, such as the target utilization level of a target tracking scaling policy.
        public let minCapacity: Int?

        @inlinable
        public init(maxCapacity: Int? = nil, minCapacity: Int? = nil) {
            self.maxCapacity = maxCapacity
            self.minCapacity = minCapacity
        }

        private enum CodingKeys: String, CodingKey {
            case maxCapacity = "MaxCapacity"
            case minCapacity = "MinCapacity"
        }
    }

    public struct ScalingActivity: AWSDecodableShape {
        /// The unique identifier of the scaling activity.
        public let activityId: String
        /// A simple description of what caused the scaling activity to happen.
        public let cause: String
        /// A simple description of what action the scaling activity intends to accomplish.
        public let description: String
        /// The details about the scaling activity.
        public let details: String?
        /// The Unix timestamp for when the scaling activity ended.
        public let endTime: Date?
        /// Machine-readable data that describes the reason for a not scaled activity. Only available when DescribeScalingActivities includes not scaled activities.
        public let notScaledReasons: [NotScaledReason]?
        /// The identifier of the resource associated with the scaling activity. This string consists of the resource type and unique identifier.   ECS service - The resource type is service and the unique identifier is the cluster name   and service name. Example: service/my-cluster/my-service.   Spot Fleet - The resource type is spot-fleet-request and the unique identifier is the  Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.   EMR cluster - The resource type is instancegroup and the unique identifier is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.   AppStream 2.0 fleet - The resource type is fleet and the unique identifier is the fleet name. Example: fleet/sample-fleet.   DynamoDB table - The resource type is table and the unique identifier is the table name.  Example: table/my-table.   DynamoDB global secondary index - The resource type is index and the unique identifier is the index name.  Example: table/my-table/index/my-table-index.   Aurora DB cluster - The resource type is cluster and the unique identifier is the cluster name. Example: cluster:my-db-cluster.   SageMaker endpoint variant - The resource type is variant and the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.   Custom resources are not supported with a resource type. This parameter must specify the OutputValue from the CloudFormation template stack used to access the resources. The unique identifier is defined by the service provider. More information is available in our GitHub repository.   Amazon Comprehend document classification endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us-west-2:123456789012:document-classifier-endpoint/EXAMPLE.   Amazon Comprehend entity recognizer endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us-west-2:123456789012:entity-recognizer-endpoint/EXAMPLE.   Lambda provisioned concurrency - The resource type is function and the unique identifier is the function name with a function version or alias name suffix that is not $LATEST.  Example: function:my-function:prod or function:my-function:1.   Amazon Keyspaces table - The resource type is table and the unique identifier is the table name.  Example: keyspace/mykeyspace/table/mytable.   Amazon MSK cluster - The resource type and unique identifier are specified using the cluster ARN.  Example: arn:aws:kafka:us-east-1:123456789012:cluster/demo-cluster-1/6357e0b2-0e6a-4b86-a0b4-70df934c2e31-5.   Amazon ElastiCache replication group - The resource type is replication-group and the unique identifier is the replication group name. Example: replication-group/mycluster.   Amazon ElastiCache cache cluster - The resource type is cache-cluster and the unique identifier is the cache cluster name. Example: cache-cluster/mycluster.   Neptune cluster - The resource type is cluster and the unique identifier is the cluster name. Example: cluster:mycluster.   SageMaker serverless endpoint - The resource type is variant and the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.   SageMaker inference component - The resource type is inference-component and the unique identifier is the resource ID. Example: inference-component/my-inference-component.   Pool of WorkSpaces - The resource type is workspacespool and the unique identifier is the pool ID.  Example: workspacespool/wspool-123456.
        public let resourceId: String
        /// The scalable dimension. This string consists of the service namespace, resource type, and scaling property.    ecs:service:DesiredCount - The task count of an ECS service.    elasticmapreduce:instancegroup:InstanceCount - The instance count of an EMR Instance Group.    ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot Fleet.    appstream:fleet:DesiredCapacity - The capacity of an AppStream 2.0 fleet.    dynamodb:table:ReadCapacityUnits - The provisioned read capacity for a DynamoDB table.    dynamodb:table:WriteCapacityUnits - The provisioned write capacity for a DynamoDB table.    dynamodb:index:ReadCapacityUnits - The provisioned read capacity for a DynamoDB global secondary index.    dynamodb:index:WriteCapacityUnits - The provisioned write capacity for a DynamoDB global secondary index.    rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora DB cluster. Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible edition.    sagemaker:variant:DesiredInstanceCount - The number of EC2 instances for a SageMaker model endpoint variant.    custom-resource:ResourceType:Property - The scalable dimension for a custom resource provided by your own application or service.    comprehend:document-classifier-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend document classification endpoint.    comprehend:entity-recognizer-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend entity recognizer endpoint.    lambda:function:ProvisionedConcurrency - The provisioned concurrency for a Lambda function.    cassandra:table:ReadCapacityUnits - The provisioned read capacity for an Amazon Keyspaces table.    cassandra:table:WriteCapacityUnits - The provisioned write capacity for an Amazon Keyspaces table.    kafka:broker-storage:VolumeSize - The provisioned volume size (in GiB) for brokers in an Amazon MSK cluster.    elasticache:cache-cluster:Nodes - The number of nodes for an Amazon ElastiCache cache cluster.    elasticache:replication-group:NodeGroups - The number of node groups for an Amazon ElastiCache replication group.    elasticache:replication-group:Replicas - The number of replicas per node group for an Amazon ElastiCache replication group.    neptune:cluster:ReadReplicaCount - The count of read replicas in an Amazon Neptune DB cluster.    sagemaker:variant:DesiredProvisionedConcurrency - The provisioned concurrency for a SageMaker serverless endpoint.    sagemaker:inference-component:DesiredCopyCount - The number of copies across an endpoint for a SageMaker inference component.    workspaces:workspacespool:DesiredUserSessions - The number of user sessions for the WorkSpaces in the pool.
        public let scalableDimension: ScalableDimension
        /// The namespace of the Amazon Web Services service that provides the resource, or a custom-resource.
        public let serviceNamespace: ServiceNamespace
        /// The Unix timestamp for when the scaling activity began.
        public let startTime: Date
        /// Indicates the status of the scaling activity.
        public let statusCode: ScalingActivityStatusCode
        /// A simple message about the current status of the scaling activity.
        public let statusMessage: String?

        @inlinable
        public init(activityId: String, cause: String, description: String, details: String? = nil, endTime: Date? = nil, notScaledReasons: [NotScaledReason]? = nil, resourceId: String, scalableDimension: ScalableDimension, serviceNamespace: ServiceNamespace, startTime: Date, statusCode: ScalingActivityStatusCode, statusMessage: String? = nil) {
            self.activityId = activityId
            self.cause = cause
            self.description = description
            self.details = details
            self.endTime = endTime
            self.notScaledReasons = notScaledReasons
            self.resourceId = resourceId
            self.scalableDimension = scalableDimension
            self.serviceNamespace = serviceNamespace
            self.startTime = startTime
            self.statusCode = statusCode
            self.statusMessage = statusMessage
        }

        private enum CodingKeys: String, CodingKey {
            case activityId = "ActivityId"
            case cause = "Cause"
            case description = "Description"
            case details = "Details"
            case endTime = "EndTime"
            case notScaledReasons = "NotScaledReasons"
            case resourceId = "ResourceId"
            case scalableDimension = "ScalableDimension"
            case serviceNamespace = "ServiceNamespace"
            case startTime = "StartTime"
            case statusCode = "StatusCode"
            case statusMessage = "StatusMessage"
        }
    }

    public struct ScalingPolicy: AWSDecodableShape {
        /// The CloudWatch alarms associated with the scaling policy.
        public let alarms: [Alarm]?
        /// The Unix timestamp for when the scaling policy was created.
        public let creationTime: Date
        /// The Amazon Resource Name (ARN) of the scaling policy.
        public let policyARN: String
        /// The name of the scaling policy.
        public let policyName: String
        /// The scaling policy type. The following policy types are supported:   TargetTrackingScaling—Not supported for Amazon EMR  StepScaling—Not supported for DynamoDB, Amazon Comprehend, Lambda, Amazon Keyspaces, Amazon MSK, Amazon ElastiCache, or Neptune.  PredictiveScaling—Only supported for Amazon ECS
        public let policyType: PolicyType
        ///  The predictive scaling policy configuration.
        public let predictiveScalingPolicyConfiguration: PredictiveScalingPolicyConfiguration?
        /// The identifier of the resource associated with the scaling policy. This string consists of the resource type and unique identifier.   ECS service - The resource type is service and the unique identifier is the cluster name   and service name. Example: service/my-cluster/my-service.   Spot Fleet - The resource type is spot-fleet-request and the unique identifier is the  Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.   EMR cluster - The resource type is instancegroup and the unique identifier is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.   AppStream 2.0 fleet - The resource type is fleet and the unique identifier is the fleet name. Example: fleet/sample-fleet.   DynamoDB table - The resource type is table and the unique identifier is the table name.  Example: table/my-table.   DynamoDB global secondary index - The resource type is index and the unique identifier is the index name.  Example: table/my-table/index/my-table-index.   Aurora DB cluster - The resource type is cluster and the unique identifier is the cluster name. Example: cluster:my-db-cluster.   SageMaker endpoint variant - The resource type is variant and the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.   Custom resources are not supported with a resource type. This parameter must specify the OutputValue from the CloudFormation template stack used to access the resources. The unique identifier is defined by the service provider. More information is available in our GitHub repository.   Amazon Comprehend document classification endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us-west-2:123456789012:document-classifier-endpoint/EXAMPLE.   Amazon Comprehend entity recognizer endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us-west-2:123456789012:entity-recognizer-endpoint/EXAMPLE.   Lambda provisioned concurrency - The resource type is function and the unique identifier is the function name with a function version or alias name suffix that is not $LATEST.  Example: function:my-function:prod or function:my-function:1.   Amazon Keyspaces table - The resource type is table and the unique identifier is the table name.  Example: keyspace/mykeyspace/table/mytable.   Amazon MSK cluster - The resource type and unique identifier are specified using the cluster ARN.  Example: arn:aws:kafka:us-east-1:123456789012:cluster/demo-cluster-1/6357e0b2-0e6a-4b86-a0b4-70df934c2e31-5.   Amazon ElastiCache replication group - The resource type is replication-group and the unique identifier is the replication group name. Example: replication-group/mycluster.   Amazon ElastiCache cache cluster - The resource type is cache-cluster and the unique identifier is the cache cluster name. Example: cache-cluster/mycluster.   Neptune cluster - The resource type is cluster and the unique identifier is the cluster name. Example: cluster:mycluster.   SageMaker serverless endpoint - The resource type is variant and the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.   SageMaker inference component - The resource type is inference-component and the unique identifier is the resource ID. Example: inference-component/my-inference-component.   Pool of WorkSpaces - The resource type is workspacespool and the unique identifier is the pool ID.  Example: workspacespool/wspool-123456.
        public let resourceId: String
        /// The scalable dimension. This string consists of the service namespace, resource type, and scaling property.    ecs:service:DesiredCount - The task count of an ECS service.    elasticmapreduce:instancegroup:InstanceCount - The instance count of an EMR Instance Group.    ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot Fleet.    appstream:fleet:DesiredCapacity - The capacity of an AppStream 2.0 fleet.    dynamodb:table:ReadCapacityUnits - The provisioned read capacity for a DynamoDB table.    dynamodb:table:WriteCapacityUnits - The provisioned write capacity for a DynamoDB table.    dynamodb:index:ReadCapacityUnits - The provisioned read capacity for a DynamoDB global secondary index.    dynamodb:index:WriteCapacityUnits - The provisioned write capacity for a DynamoDB global secondary index.    rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora DB cluster. Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible edition.    sagemaker:variant:DesiredInstanceCount - The number of EC2 instances for a SageMaker model endpoint variant.    custom-resource:ResourceType:Property - The scalable dimension for a custom resource provided by your own application or service.    comprehend:document-classifier-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend document classification endpoint.    comprehend:entity-recognizer-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend entity recognizer endpoint.    lambda:function:ProvisionedConcurrency - The provisioned concurrency for a Lambda function.    cassandra:table:ReadCapacityUnits - The provisioned read capacity for an Amazon Keyspaces table.    cassandra:table:WriteCapacityUnits - The provisioned write capacity for an Amazon Keyspaces table.    kafka:broker-storage:VolumeSize - The provisioned volume size (in GiB) for brokers in an Amazon MSK cluster.    elasticache:cache-cluster:Nodes - The number of nodes for an Amazon ElastiCache cache cluster.    elasticache:replication-group:NodeGroups - The number of node groups for an Amazon ElastiCache replication group.    elasticache:replication-group:Replicas - The number of replicas per node group for an Amazon ElastiCache replication group.    neptune:cluster:ReadReplicaCount - The count of read replicas in an Amazon Neptune DB cluster.    sagemaker:variant:DesiredProvisionedConcurrency - The provisioned concurrency for a SageMaker serverless endpoint.    sagemaker:inference-component:DesiredCopyCount - The number of copies across an endpoint for a SageMaker inference component.    workspaces:workspacespool:DesiredUserSessions - The number of user sessions for the WorkSpaces in the pool.
        public let scalableDimension: ScalableDimension
        /// The namespace of the Amazon Web Services service that provides the resource, or a custom-resource.
        public let serviceNamespace: ServiceNamespace
        /// A step scaling policy.
        public let stepScalingPolicyConfiguration: StepScalingPolicyConfiguration?
        /// A target tracking scaling policy.
        public let targetTrackingScalingPolicyConfiguration: TargetTrackingScalingPolicyConfiguration?

        @inlinable
        public init(alarms: [Alarm]? = nil, creationTime: Date, policyARN: String, policyName: String, policyType: PolicyType, predictiveScalingPolicyConfiguration: PredictiveScalingPolicyConfiguration? = nil, resourceId: String, scalableDimension: ScalableDimension, serviceNamespace: ServiceNamespace, stepScalingPolicyConfiguration: StepScalingPolicyConfiguration? = nil, targetTrackingScalingPolicyConfiguration: TargetTrackingScalingPolicyConfiguration? = nil) {
            self.alarms = alarms
            self.creationTime = creationTime
            self.policyARN = policyARN
            self.policyName = policyName
            self.policyType = policyType
            self.predictiveScalingPolicyConfiguration = predictiveScalingPolicyConfiguration
            self.resourceId = resourceId
            self.scalableDimension = scalableDimension
            self.serviceNamespace = serviceNamespace
            self.stepScalingPolicyConfiguration = stepScalingPolicyConfiguration
            self.targetTrackingScalingPolicyConfiguration = targetTrackingScalingPolicyConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case alarms = "Alarms"
            case creationTime = "CreationTime"
            case policyARN = "PolicyARN"
            case policyName = "PolicyName"
            case policyType = "PolicyType"
            case predictiveScalingPolicyConfiguration = "PredictiveScalingPolicyConfiguration"
            case resourceId = "ResourceId"
            case scalableDimension = "ScalableDimension"
            case serviceNamespace = "ServiceNamespace"
            case stepScalingPolicyConfiguration = "StepScalingPolicyConfiguration"
            case targetTrackingScalingPolicyConfiguration = "TargetTrackingScalingPolicyConfiguration"
        }
    }

    public struct ScheduledAction: AWSDecodableShape {
        /// The date and time that the scheduled action was created.
        public let creationTime: Date
        /// The date and time that the action is scheduled to end, in UTC.
        public let endTime: Date?
        /// The identifier of the resource associated with the scaling policy. This string consists of the resource type and unique identifier.   ECS service - The resource type is service and the unique identifier is the cluster name   and service name. Example: service/my-cluster/my-service.   Spot Fleet - The resource type is spot-fleet-request and the unique identifier is the  Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.   EMR cluster - The resource type is instancegroup and the unique identifier is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.   AppStream 2.0 fleet - The resource type is fleet and the unique identifier is the fleet name. Example: fleet/sample-fleet.   DynamoDB table - The resource type is table and the unique identifier is the table name.  Example: table/my-table.   DynamoDB global secondary index - The resource type is index and the unique identifier is the index name.  Example: table/my-table/index/my-table-index.   Aurora DB cluster - The resource type is cluster and the unique identifier is the cluster name. Example: cluster:my-db-cluster.   SageMaker endpoint variant - The resource type is variant and the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.   Custom resources are not supported with a resource type. This parameter must specify the OutputValue from the CloudFormation template stack used to access the resources. The unique identifier is defined by the service provider. More information is available in our GitHub repository.   Amazon Comprehend document classification endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us-west-2:123456789012:document-classifier-endpoint/EXAMPLE.   Amazon Comprehend entity recognizer endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us-west-2:123456789012:entity-recognizer-endpoint/EXAMPLE.   Lambda provisioned concurrency - The resource type is function and the unique identifier is the function name with a function version or alias name suffix that is not $LATEST.  Example: function:my-function:prod or function:my-function:1.   Amazon Keyspaces table - The resource type is table and the unique identifier is the table name.  Example: keyspace/mykeyspace/table/mytable.   Amazon MSK cluster - The resource type and unique identifier are specified using the cluster ARN.  Example: arn:aws:kafka:us-east-1:123456789012:cluster/demo-cluster-1/6357e0b2-0e6a-4b86-a0b4-70df934c2e31-5.   Amazon ElastiCache replication group - The resource type is replication-group and the unique identifier is the replication group name. Example: replication-group/mycluster.   Amazon ElastiCache cache cluster - The resource type is cache-cluster and the unique identifier is the cache cluster name. Example: cache-cluster/mycluster.   Neptune cluster - The resource type is cluster and the unique identifier is the cluster name. Example: cluster:mycluster.   SageMaker serverless endpoint - The resource type is variant and the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.   SageMaker inference component - The resource type is inference-component and the unique identifier is the resource ID. Example: inference-component/my-inference-component.   Pool of WorkSpaces - The resource type is workspacespool and the unique identifier is the pool ID.  Example: workspacespool/wspool-123456.
        public let resourceId: String
        /// The scalable dimension. This string consists of the service namespace, resource type, and scaling property.    ecs:service:DesiredCount - The task count of an ECS service.    elasticmapreduce:instancegroup:InstanceCount - The instance count of an EMR Instance Group.    ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot Fleet.    appstream:fleet:DesiredCapacity - The capacity of an AppStream 2.0 fleet.    dynamodb:table:ReadCapacityUnits - The provisioned read capacity for a DynamoDB table.    dynamodb:table:WriteCapacityUnits - The provisioned write capacity for a DynamoDB table.    dynamodb:index:ReadCapacityUnits - The provisioned read capacity for a DynamoDB global secondary index.    dynamodb:index:WriteCapacityUnits - The provisioned write capacity for a DynamoDB global secondary index.    rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora DB cluster. Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible edition.    sagemaker:variant:DesiredInstanceCount - The number of EC2 instances for a SageMaker model endpoint variant.    custom-resource:ResourceType:Property - The scalable dimension for a custom resource provided by your own application or service.    comprehend:document-classifier-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend document classification endpoint.    comprehend:entity-recognizer-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend entity recognizer endpoint.    lambda:function:ProvisionedConcurrency - The provisioned concurrency for a Lambda function.    cassandra:table:ReadCapacityUnits - The provisioned read capacity for an Amazon Keyspaces table.    cassandra:table:WriteCapacityUnits - The provisioned write capacity for an Amazon Keyspaces table.    kafka:broker-storage:VolumeSize - The provisioned volume size (in GiB) for brokers in an Amazon MSK cluster.    elasticache:cache-cluster:Nodes - The number of nodes for an Amazon ElastiCache cache cluster.    elasticache:replication-group:NodeGroups - The number of node groups for an Amazon ElastiCache replication group.    elasticache:replication-group:Replicas - The number of replicas per node group for an Amazon ElastiCache replication group.    neptune:cluster:ReadReplicaCount - The count of read replicas in an Amazon Neptune DB cluster.    sagemaker:variant:DesiredProvisionedConcurrency - The provisioned concurrency for a SageMaker serverless endpoint.    sagemaker:inference-component:DesiredCopyCount - The number of copies across an endpoint for a SageMaker inference component.    workspaces:workspacespool:DesiredUserSessions - The number of user sessions for the WorkSpaces in the pool.
        public let scalableDimension: ScalableDimension?
        /// The new minimum and maximum capacity. You can set both values or just one. At the scheduled time, if the current capacity is below the minimum capacity, Application Auto Scaling scales out to the minimum capacity. If the current capacity is above the maximum capacity, Application Auto Scaling scales in to the maximum capacity.
        public let scalableTargetAction: ScalableTargetAction?
        /// The schedule for this action. The following formats are supported:   At expressions - "at(yyyy-mm-ddThh:mm:ss)"   Rate expressions - "rate(value unit)"   Cron expressions - "cron(fields)"   At expressions are useful for one-time schedules. Cron expressions are useful for  scheduled actions that run periodically at a specified date and time, and rate expressions  are useful for scheduled actions that run at a regular interval. At and cron expressions use Universal Coordinated Time (UTC) by default. The cron format consists of six fields separated by white spaces: [Minutes] [Hours] [Day_of_Month] [Month] [Day_of_Week] [Year]. For rate expressions, value is a positive integer and unit is  minute | minutes | hour | hours | day | days. For more information, see Schedule recurring scaling actions using cron expressions in the Application Auto Scaling User Guide.
        public let schedule: String
        /// The Amazon Resource Name (ARN) of the scheduled action.
        public let scheduledActionARN: String
        /// The name of the scheduled action.
        public let scheduledActionName: String
        /// The namespace of the Amazon Web Services service that provides the resource, or a custom-resource.
        public let serviceNamespace: ServiceNamespace
        /// The date and time that the action is scheduled to begin, in UTC.
        public let startTime: Date?
        /// The time zone used when referring to the date and time of a scheduled action, when the scheduled action uses an at or cron expression.
        public let timezone: String?

        @inlinable
        public init(creationTime: Date, endTime: Date? = nil, resourceId: String, scalableDimension: ScalableDimension? = nil, scalableTargetAction: ScalableTargetAction? = nil, schedule: String, scheduledActionARN: String, scheduledActionName: String, serviceNamespace: ServiceNamespace, startTime: Date? = nil, timezone: String? = nil) {
            self.creationTime = creationTime
            self.endTime = endTime
            self.resourceId = resourceId
            self.scalableDimension = scalableDimension
            self.scalableTargetAction = scalableTargetAction
            self.schedule = schedule
            self.scheduledActionARN = scheduledActionARN
            self.scheduledActionName = scheduledActionName
            self.serviceNamespace = serviceNamespace
            self.startTime = startTime
            self.timezone = timezone
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime = "CreationTime"
            case endTime = "EndTime"
            case resourceId = "ResourceId"
            case scalableDimension = "ScalableDimension"
            case scalableTargetAction = "ScalableTargetAction"
            case schedule = "Schedule"
            case scheduledActionARN = "ScheduledActionARN"
            case scheduledActionName = "ScheduledActionName"
            case serviceNamespace = "ServiceNamespace"
            case startTime = "StartTime"
            case timezone = "Timezone"
        }
    }

    public struct StepAdjustment: AWSEncodableShape & AWSDecodableShape {
        /// The lower bound for the difference between the alarm threshold and the CloudWatch metric. If the metric value is above the breach threshold, the lower bound is inclusive (the metric must be greater than or equal to the threshold plus the lower bound). Otherwise, it's exclusive (the metric must be greater than the threshold plus the lower bound). A null value indicates negative infinity.
        public let metricIntervalLowerBound: Double?
        /// The upper bound for the difference between the alarm threshold and the CloudWatch metric. If the metric value is above the breach threshold, the upper bound is exclusive (the metric must be less than the threshold plus the upper bound). Otherwise, it's inclusive (the metric must be less than or equal to the threshold plus the upper bound). A null value indicates positive infinity. The upper bound must be greater than the lower bound.
        public let metricIntervalUpperBound: Double?
        /// The amount by which to scale, based on the specified adjustment type. A positive value adds to the current capacity while a negative number removes from the current capacity. For exact capacity, you must specify a non-negative value.
        public let scalingAdjustment: Int

        @inlinable
        public init(metricIntervalLowerBound: Double? = nil, metricIntervalUpperBound: Double? = nil, scalingAdjustment: Int) {
            self.metricIntervalLowerBound = metricIntervalLowerBound
            self.metricIntervalUpperBound = metricIntervalUpperBound
            self.scalingAdjustment = scalingAdjustment
        }

        private enum CodingKeys: String, CodingKey {
            case metricIntervalLowerBound = "MetricIntervalLowerBound"
            case metricIntervalUpperBound = "MetricIntervalUpperBound"
            case scalingAdjustment = "ScalingAdjustment"
        }
    }

    public struct StepScalingPolicyConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Specifies how the ScalingAdjustment value in a StepAdjustment is interpreted (for example, an absolute number or a percentage). The valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.   AdjustmentType is required if you are adding a new step scaling policy configuration.
        public let adjustmentType: AdjustmentType?
        /// The amount of time, in seconds, to wait for a previous scaling activity to take effect. If not specified, the default value is 300. For more information, see Cooldown period in the Application Auto Scaling User Guide.
        public let cooldown: Int?
        /// The aggregation type for the CloudWatch metrics. Valid values are Minimum, Maximum, and Average. If the aggregation type is null, the value is treated as Average.
        public let metricAggregationType: MetricAggregationType?
        /// The minimum value to scale by when the adjustment type is PercentChangeInCapacity. For example, suppose that you create a step scaling policy to scale out an Amazon ECS service by 25 percent and you specify a MinAdjustmentMagnitude of 2. If the service has 4 tasks and the scaling policy is performed, 25 percent of 4 is 1. However, because you specified a MinAdjustmentMagnitude of 2, Application Auto Scaling scales out the service by 2 tasks.
        public let minAdjustmentMagnitude: Int?
        /// A set of adjustments that enable you to scale based on the size of the alarm breach. At least one step adjustment is required if you are adding a new step scaling policy configuration.
        public let stepAdjustments: [StepAdjustment]?

        @inlinable
        public init(adjustmentType: AdjustmentType? = nil, cooldown: Int? = nil, metricAggregationType: MetricAggregationType? = nil, minAdjustmentMagnitude: Int? = nil, stepAdjustments: [StepAdjustment]? = nil) {
            self.adjustmentType = adjustmentType
            self.cooldown = cooldown
            self.metricAggregationType = metricAggregationType
            self.minAdjustmentMagnitude = minAdjustmentMagnitude
            self.stepAdjustments = stepAdjustments
        }

        private enum CodingKeys: String, CodingKey {
            case adjustmentType = "AdjustmentType"
            case cooldown = "Cooldown"
            case metricAggregationType = "MetricAggregationType"
            case minAdjustmentMagnitude = "MinAdjustmentMagnitude"
            case stepAdjustments = "StepAdjustments"
        }
    }

    public struct SuspendedState: AWSEncodableShape & AWSDecodableShape {
        /// Whether scale in by a target tracking scaling policy or a step scaling policy is suspended. Set the value to true if you don't want Application Auto Scaling to remove capacity when a scaling policy is triggered. The default is false.
        public let dynamicScalingInSuspended: Bool?
        /// Whether scale out by a target tracking scaling policy or a step scaling policy is suspended. Set the value to true if you don't want Application Auto Scaling to add capacity when a scaling policy is triggered. The default is false.
        public let dynamicScalingOutSuspended: Bool?
        /// Whether scheduled scaling is suspended. Set the value to true if you don't want Application Auto Scaling to add or remove capacity by initiating scheduled actions. The default is false.
        public let scheduledScalingSuspended: Bool?

        @inlinable
        public init(dynamicScalingInSuspended: Bool? = nil, dynamicScalingOutSuspended: Bool? = nil, scheduledScalingSuspended: Bool? = nil) {
            self.dynamicScalingInSuspended = dynamicScalingInSuspended
            self.dynamicScalingOutSuspended = dynamicScalingOutSuspended
            self.scheduledScalingSuspended = scheduledScalingSuspended
        }

        private enum CodingKeys: String, CodingKey {
            case dynamicScalingInSuspended = "DynamicScalingInSuspended"
            case dynamicScalingOutSuspended = "DynamicScalingOutSuspended"
            case scheduledScalingSuspended = "ScheduledScalingSuspended"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        /// Identifies the Application Auto Scaling scalable target that you want to apply tags to. For example: arn:aws:application-autoscaling:us-east-1:123456789012:scalable-target/1234abcd56ab78cd901ef1234567890ab123  To get the ARN for a scalable target, use DescribeScalableTargets.
        public let resourceARN: String
        /// The tags assigned to the resource. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a tag key and a tag value. You cannot have more than one tag on an Application Auto Scaling scalable target with the same tag key. If you specify an existing tag key with a different tag value, Application Auto Scaling replaces the current tag value with the specified one. For information about the rules that apply to tag keys and tag values, see User-defined tag restrictions in the Amazon Web Services Billing User Guide.
        public let tags: [String: String]

        @inlinable
        public init(resourceARN: String, tags: [String: String]) {
            self.resourceARN = resourceARN
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 1011)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 1)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, pattern: "^arn:.+:application-autoscaling:.+:[0-9]+:scalable-target\\/[a-zA-Z0-9-]+$")
            try self.tags.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
            case tags = "Tags"
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct TargetTrackingMetric: AWSEncodableShape & AWSDecodableShape {
        /// The dimensions for the metric. For the list of available dimensions, see the Amazon Web Services documentation available from the table in Amazon Web Services services that publish CloudWatch metrics  in the Amazon CloudWatch User Guide.  Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.
        public let dimensions: [TargetTrackingMetricDimension]?
        /// The name of the metric.
        public let metricName: String?
        /// The namespace of the metric. For more information, see the table in Amazon Web Services services that publish CloudWatch metrics  in the Amazon CloudWatch User Guide.
        public let namespace: String?

        @inlinable
        public init(dimensions: [TargetTrackingMetricDimension]? = nil, metricName: String? = nil, namespace: String? = nil) {
            self.dimensions = dimensions
            self.metricName = metricName
            self.namespace = namespace
        }

        public func validate(name: String) throws {
            try self.dimensions?.forEach {
                try $0.validate(name: "\(name).dimensions[]")
            }
            try self.validate(self.metricName, name: "metricName", parent: name, max: 255)
            try self.validate(self.metricName, name: "metricName", parent: name, min: 1)
            try self.validate(self.metricName, name: "metricName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.namespace, name: "namespace", parent: name, max: 255)
            try self.validate(self.namespace, name: "namespace", parent: name, min: 1)
            try self.validate(self.namespace, name: "namespace", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case dimensions = "Dimensions"
            case metricName = "MetricName"
            case namespace = "Namespace"
        }
    }

    public struct TargetTrackingMetricDataQuery: AWSEncodableShape & AWSDecodableShape {
        /// The math expression to perform on the returned data, if this object is performing a math expression. This expression can use the Id of the other metrics to refer to those metrics, and can also use the Id of other expressions to use the result of those expressions.  Conditional: Within each TargetTrackingMetricDataQuery object, you must specify either Expression or MetricStat, but not both.
        public let expression: String?
        /// A short name that identifies the object's results in the response. This name must be unique among all MetricDataQuery objects specified for a single scaling policy. If you are performing math expressions on this set of data, this name represents that data and can serve as a variable in the mathematical expression. The valid characters are letters, numbers, and underscores. The first character must be a lowercase letter.
        public let id: String
        /// A human-readable label for this metric or expression. This is especially useful if this is a math expression, so that you know what the value represents.
        public let label: String?
        /// Information about the metric data to return. Conditional: Within each MetricDataQuery object, you must specify either Expression or MetricStat, but not both.
        public let metricStat: TargetTrackingMetricStat?
        /// Indicates whether to return the timestamps and raw data values of this metric.  If you use any math expressions, specify true for this value for only the final math expression that the metric specification is based on. You must specify false for ReturnData for all the other metrics and expressions used in the metric specification. If you are only retrieving metrics and not performing any math expressions, do not specify anything for ReturnData. This sets it to its default (true).
        public let returnData: Bool?

        @inlinable
        public init(expression: String? = nil, id: String, label: String? = nil, metricStat: TargetTrackingMetricStat? = nil, returnData: Bool? = nil) {
            self.expression = expression
            self.id = id
            self.label = label
            self.metricStat = metricStat
            self.returnData = returnData
        }

        public func validate(name: String) throws {
            try self.validate(self.expression, name: "expression", parent: name, max: 2048)
            try self.validate(self.expression, name: "expression", parent: name, min: 1)
            try self.validate(self.expression, name: "expression", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.id, name: "id", parent: name, max: 255)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.label, name: "label", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.metricStat?.validate(name: "\(name).metricStat")
        }

        private enum CodingKeys: String, CodingKey {
            case expression = "Expression"
            case id = "Id"
            case label = "Label"
            case metricStat = "MetricStat"
            case returnData = "ReturnData"
        }
    }

    public struct TargetTrackingMetricDimension: AWSEncodableShape & AWSDecodableShape {
        /// The name of the dimension.
        public let name: String
        /// The value of the dimension.
        public let value: String

        @inlinable
        public init(name: String, value: String) {
            self.name = name
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 255)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.value, name: "value", parent: name, max: 1024)
            try self.validate(self.value, name: "value", parent: name, min: 1)
            try self.validate(self.value, name: "value", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case value = "Value"
        }
    }

    public struct TargetTrackingMetricStat: AWSEncodableShape & AWSDecodableShape {
        /// The CloudWatch metric to return, including the metric name, namespace, and dimensions. To get the exact metric name, namespace, and dimensions, inspect the Metric object that is returned by a call to ListMetrics.
        public let metric: TargetTrackingMetric
        /// The statistic to return. It can include any CloudWatch statistic or extended statistic. For a list of valid values, see the table in Statistics in the Amazon CloudWatch User Guide. The most commonly used metric for scaling is Average.
        public let stat: String
        /// The unit to use for the returned data points. For a complete list of the units that CloudWatch supports, see the MetricDatum data type in the Amazon CloudWatch API Reference.
        public let unit: String?

        @inlinable
        public init(metric: TargetTrackingMetric, stat: String, unit: String? = nil) {
            self.metric = metric
            self.stat = stat
            self.unit = unit
        }

        public func validate(name: String) throws {
            try self.metric.validate(name: "\(name).metric")
            try self.validate(self.stat, name: "stat", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.unit, name: "unit", parent: name, max: 1023)
            try self.validate(self.unit, name: "unit", parent: name, min: 1)
            try self.validate(self.unit, name: "unit", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case metric = "Metric"
            case stat = "Stat"
            case unit = "Unit"
        }
    }

    public struct TargetTrackingScalingPolicyConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// A customized metric. You can specify either a predefined metric or a customized metric.
        public let customizedMetricSpecification: CustomizedMetricSpecification?
        /// Indicates whether scale in by the target tracking scaling policy is disabled. If the value is true, scale in is disabled and the target tracking scaling policy won't remove capacity from the scalable target. Otherwise, scale in is enabled and the target tracking scaling policy can remove capacity from the scalable target. The default value is false.
        public let disableScaleIn: Bool?
        /// A predefined metric. You can specify either a predefined metric or a customized metric.
        public let predefinedMetricSpecification: PredefinedMetricSpecification?
        /// The amount of time, in seconds, after a scale-in activity completes before another scale-in activity can start. For more information and for default values, see Define cooldown periods in the Application Auto Scaling User Guide.
        public let scaleInCooldown: Int?
        /// The amount of time, in seconds, to wait for a previous scale-out activity to take effect. For more information and for default values, see Define cooldown periods in the Application Auto Scaling User Guide.
        public let scaleOutCooldown: Int?
        /// The target value for the metric. Although this property accepts numbers of type Double, it won't accept values that are either too small or too large. Values must be in the range of -2^360 to 2^360. The value must be a valid number based on the choice of metric. For example, if the metric is CPU utilization, then the target value is a percent value that represents how much of the CPU can be used before scaling out.   If the scaling policy specifies the ALBRequestCountPerTarget predefined metric, specify the target utilization as the optimal average request count per target during any one-minute interval.
        public let targetValue: Double

        @inlinable
        public init(customizedMetricSpecification: CustomizedMetricSpecification? = nil, disableScaleIn: Bool? = nil, predefinedMetricSpecification: PredefinedMetricSpecification? = nil, scaleInCooldown: Int? = nil, scaleOutCooldown: Int? = nil, targetValue: Double) {
            self.customizedMetricSpecification = customizedMetricSpecification
            self.disableScaleIn = disableScaleIn
            self.predefinedMetricSpecification = predefinedMetricSpecification
            self.scaleInCooldown = scaleInCooldown
            self.scaleOutCooldown = scaleOutCooldown
            self.targetValue = targetValue
        }

        public func validate(name: String) throws {
            try self.customizedMetricSpecification?.validate(name: "\(name).customizedMetricSpecification")
            try self.predefinedMetricSpecification?.validate(name: "\(name).predefinedMetricSpecification")
        }

        private enum CodingKeys: String, CodingKey {
            case customizedMetricSpecification = "CustomizedMetricSpecification"
            case disableScaleIn = "DisableScaleIn"
            case predefinedMetricSpecification = "PredefinedMetricSpecification"
            case scaleInCooldown = "ScaleInCooldown"
            case scaleOutCooldown = "ScaleOutCooldown"
            case targetValue = "TargetValue"
        }
    }

    public struct TooManyTagsException: AWSErrorShape {
        public let message: String?
        /// The name of the Application Auto Scaling resource. This value is an Amazon Resource Name (ARN).
        public let resourceName: String?

        @inlinable
        public init(message: String? = nil, resourceName: String? = nil) {
            self.message = message
            self.resourceName = resourceName
        }

        private enum CodingKeys: String, CodingKey {
            case message = "Message"
            case resourceName = "ResourceName"
        }
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        /// Identifies the Application Auto Scaling scalable target from which to remove tags. For example: arn:aws:application-autoscaling:us-east-1:123456789012:scalable-target/1234abcd56ab78cd901ef1234567890ab123  To get the ARN for a scalable target, use DescribeScalableTargets.
        public let resourceARN: String
        /// One or more tag keys. Specify only the tag keys, not the tag values.
        public let tagKeys: [String]

        @inlinable
        public init(resourceARN: String, tagKeys: [String]) {
            self.resourceARN = resourceARN
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 1011)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 1)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, pattern: "^arn:.+:application-autoscaling:.+:[0-9]+:scalable-target\\/[a-zA-Z0-9-]+$")
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
            }
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
            case tagKeys = "TagKeys"
        }
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }
}

// MARK: - Errors

/// Error enum for ApplicationAutoScaling
public struct ApplicationAutoScalingErrorType: AWSErrorType {
    enum Code: String {
        case concurrentUpdateException = "ConcurrentUpdateException"
        case failedResourceAccessException = "FailedResourceAccessException"
        case internalServiceException = "InternalServiceException"
        case invalidNextTokenException = "InvalidNextTokenException"
        case limitExceededException = "LimitExceededException"
        case objectNotFoundException = "ObjectNotFoundException"
        case resourceNotFoundException = "ResourceNotFoundException"
        case tooManyTagsException = "TooManyTagsException"
        case validationException = "ValidationException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize ApplicationAutoScaling
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// Concurrent updates caused an exception, for example, if you request an update to an Application Auto Scaling resource that already has a pending update.
    public static var concurrentUpdateException: Self { .init(.concurrentUpdateException) }
    /// Failed access to resources caused an exception. This exception is thrown when Application Auto Scaling is unable to retrieve the alarms associated with a scaling policy due to a client error, for example, if the role ARN specified for a scalable target does not have permission to call the CloudWatch DescribeAlarms on your behalf.
    public static var failedResourceAccessException: Self { .init(.failedResourceAccessException) }
    /// The service encountered an internal error.
    public static var internalServiceException: Self { .init(.internalServiceException) }
    /// The next token supplied was invalid.
    public static var invalidNextTokenException: Self { .init(.invalidNextTokenException) }
    /// A per-account resource limit is exceeded. For more information, see Application Auto Scaling service quotas.
    public static var limitExceededException: Self { .init(.limitExceededException) }
    /// The specified object could not be found. For any operation that depends on the existence of a scalable target, this exception is thrown if the scalable target with the specified service namespace, resource ID, and scalable dimension does not exist. For any operation that deletes or deregisters a resource, this exception is thrown if the resource cannot be found.
    public static var objectNotFoundException: Self { .init(.objectNotFoundException) }
    /// The specified resource doesn't exist.
    public static var resourceNotFoundException: Self { .init(.resourceNotFoundException) }
    /// The request contains too many tags. Try the request again with fewer tags.
    public static var tooManyTagsException: Self { .init(.tooManyTagsException) }
    /// An exception was thrown for a validation issue. Review the available parameters for the API request.
    public static var validationException: Self { .init(.validationException) }
}

extension ApplicationAutoScalingErrorType: AWSServiceErrorType {
    public static let errorCodeMap: [String: AWSErrorShape.Type] = [
        "ResourceNotFoundException": ApplicationAutoScaling.ResourceNotFoundException.self,
        "TooManyTagsException": ApplicationAutoScaling.TooManyTagsException.self
    ]
}

extension ApplicationAutoScalingErrorType: Equatable {
    public static func == (lhs: ApplicationAutoScalingErrorType, rhs: ApplicationAutoScalingErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension ApplicationAutoScalingErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
